CLI
The SecondOS CLI runs on Bun, with no build step. It syncs your repo into a structure-aware map, answers questions against it, and flags code-to-DB drift.
Install
Run it on demand with npx, or add it to your project:
bunx @secondos/cli push .push — sync the map
Parses the repo into symbols, signatures, routes and a relationship graph, then uploads the map and embeddings. Re-runs are incremental via a parse cache, so only what changed is re-processed.
secondos push . # sync the current repo
secondos push . --deep # also embed symbol bodies (logic search)With --deep, bodies are read and embedded locally; only the vector and line references persist, never the source text.
ask — query offline
Ask a question against the synced map. It fuses lexical and semantic retrieval and grounds answers in real symbols and line references.
secondos ask "where do we hash passwords?"drift — code vs schema
Reads your Drizzle schema and the columns your code actually writes, then reports any column written in code that the schema lacks. Read-only: it alerts, it does not change anything.
secondos drift # 0 findings on a clean repoOffline mode
For fully offline runs, set SECONDOS_EMBEDDER=stub and SECONDOS_SUMMARIZER=stub. The map still builds; only the cloud-backed embedding and summary steps are stubbed.
MCP server
The same CLI hosts the MCP server that feeds your editors. See the MCP page for the tools and editor setup, or start from the quickstart.