@louhin/cli
v0.1.2
Published
Louhin CLI - browser-SSO login, pull/push code modules, run them with your local Python.
Downloads
32
Readme
Louhin CLI
Command-line tool for local development of Louhin code modules: browser-SSO login, pull modules and data to disk, edit them in your favourite editor with full debug support, and push changes back.
Install
npm install -g @louhin/cliRequires Node.js 20+. For running modules locally you also need Python 3.10 or newer.
First-time setup
louhin config set server https://example.com
louhin loginThe login command opens your browser, you sign in with the same
credentials you use on the web UI, and the CLI receives a token on a
loopback URL. Tokens are stored in ~/.config/louhin/credentials.json
(mode 0600). The server URL is remembered so later commands don't
need --server.
Typical workflow
louhin module list
louhin module pull 12345 --ide=vscode
cd My_Module
python -m venv .venv && .venv/Scripts/activate && pip install -r requirements.txt
louhin data pull 67890 # if your script reads input data
# edit files/main.py in your editor; set breakpoints, debug
louhin run
louhin module push # ship changes back to the server--ide=vscode, --ide=pycharm, and --ide=intellij are supported.
The CLI drops a .vscode/launch.json or .idea/ scaffolding so the
Louhin: Run configuration is ready to use on first open.
Commands
louhin login [--server <url>]
louhin logout [--server <url>]
louhin config # show current config
louhin config set <key> <value>
louhin config get <key>
louhin module list
louhin module pull <id> [dir] # also accepts --ide=<vscode|pycharm|intellij>
louhin module push [dir]
louhin run [--entry <file>] [--param KEY=VALUE ...]
louhin data list [--project <id>]
louhin data pull <id> [name] # writes data/<name>.json (default: in1, in2, ...)
# --all to pull the full dataset
# --anonymize for synthetic valuesPulled module layout
My_Module/
├── module.json server URL + module id, used by push
├── pyproject.toml Python project marker
├── requirements.txt default analytics stack; edit as needed
├── README.md quick reference for this module
├── files/ user-editable source code (Sources Root)
│ └── main.py
├── data/ louhin+json fixtures
│ ├── in1.json inputs your script reads as `in1`, `in2`, ...
│ └── out/ louhin run writes outputs here
└── .louhin/ CLI state (gitignored)
└── runner.py local runner shimlouhin run binds the same globals as the server-side runtime
(inputs, in1, in2, ..., params, state, render, ctx)
so the same code works identically locally and on the server.
Config files
~/.config/louhin/config.json-- default server, preferences~/.config/louhin/credentials.json-- refresh + access tokens per server (mode 0600)
Override the server per command with --server <url> or the
LOUHIN_SERVER env var.
License
MIT
