Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 2.3 KB

shell.log.md

File metadata and controls

67 lines (52 loc) · 2.3 KB

ox_db shell

base cmd :

oxdb = Oxdb("hosted")

oxdb.info()
oxdb.doc.info()
oxdb.get_db(db_name)
oxdb.doc.get_doc(doc_name)
oxdb.doc.push(**data)
oxdb.doc.pull(**data)
oxdb.doc.search(**data)

> shell session :

  • initiate a shell session in terminall for quick access
                                                                                                           
┌──(lokesh㉿kali)-[~]
└─$ oxdb.shell                                     
oxdb> search "implementation plan"
oxdb : 
{'data': ['data-1',
          'need to implement pdfsearch db with ui',
          '{"datas": ["project-queue", "priority is db"]}']}
┌──(lokesh㉿kali)-[~]
└─$ oxdb.shell
oxdb> info
oxdb : 
{'db': 'hosted',
 'db_path': '/home/lokesh/ox-db/hosted.oxdb',
 'doc_list': ['log-[18_08_2024]', 'log-[20_08_2024]', 'log-[19_08_2024]'],
 'doc_name': 'log-[20_08_2024]',
 'doc_path': '/home/lokesh/ox-db/hosted.oxdb/log-[20_08_2024]',
 'vec_model': 'sentence-transformers/all-MiniLM-L6-v2'}
oxdb> ^C
Exiting shell...
                      

to start ox-db shell run below cmd refere shell.log.md for further detials

Linux , macos and Windows

  • cmd to initiate terminal session which can intract directly to ox-db
oxdb.shell
  • on terminal access : to send db query to server with out starting a session
  • through terminal start the server then execute oxdb.shell "oxdb query"
  • refere ox-db server to start server
oxdb.shell "oxdb query"
  • if path not correctly assigned due too sudo or admin access use below cmd
python -m ox_db.shell.log