Skip to main content

fj — one-shot CLI coding agent powered by soothe-nano

Project description

fj

fj is a one-shot coding-agent CLI — everything after the command is the query:

fj who is your name
fj explain this file
fj explain the auth flow in this repo

It embeds soothe-nano (tools, skills, MCP, subagents, progressive loading) with SQLite persistence and config at ~/.soothe/config/nano.yml.

Package name: fj-ai. Runtime: soothe-nano.

Quick start

1. Install

pip install fj-ai
# or
uv tool install fj-ai

Requires Python 3.11+.

2. Config

Run guided setup for a local OpenAI-compatible server (Ollama, LM Studio, vLLM, ...):

fj setup

fj setup updates only endpoint/key/model basics in ~/.soothe/config/nano.yml and keeps other existing config keys as-is.

You can still copy the bundled example manually:

mkdir -p ~/.soothe/config
cp nano.yml ~/.soothe/config/nano.yml

nano.yml is the minimal local profile; everything else uses soothe-nano defaults.

# start your local server / pull a model, then:
fj who are you
fj list Python files in this directory

Cloud (no config file):

export OPENAI_API_KEY=sk-...
fj summarize README.md

Missing nano.yml falls back to OPENAI_API_KEY or ANTHROPIC_API_KEY.

3. Defaults

Concern Default
Config ~/.soothe/config/nano.yml (SOOTHE_HOME overrides home)
Checkpoints SQLite at ~/.soothe/data/soothe_checkpoints.db
Workspace CWD (SOOTHE_WORKSPACE)
Output Progress on stdout line 1 (tools + AI narration); final answer printed once (--no-stream hides narration preview)

Usage

fj setup
fj completion zsh|bash
fj -l
fj --reset
fj --reset <query...>
fj [options] [--] <query...>
Flag Meaning
-c PATH / --config Alternate nano.yml
-t ID / --thread Use this thread id (pins it as active)
-l / --list List latest threads (newest first; default 20)
-n NUM Number of threads to list with -l
--reset Start a new active thread (alone, or with a query)
-w DIR / --workspace Workspace root
--no-stream Disable token streaming; print final answer only
-v / --verbose Mirror tool/custom events on stderr
-V / --version Version
-- Force remaining argv into the query

Queries continue the latest active thread by default. Use --reset to start fresh.

# put fj on PATH (pick one)
uv tool install fj-ai
# or: export PATH="/Users/chenxm/Workspace/fj-ai/.venv/bin:$PATH"

# enable Tab completion (zsh)
eval "$(fj completion zsh)"
# persist in ~/.zshrc:
#   eval "$(fj completion zsh)"

Tab completion predicts natural-language intents (not only flags). It uses the router fast model from nano.yml via soothe-nano — it does not start the coding agent. Configure an optional fast role:

router_profiles:
  - name: default
    router:
      default: "local:llama3.2"
      fast: "local:llama3.2:1b"

If fast is omitted, completion falls back to default.

Note: Tab only works when fj is resolvable for the same command you type (on PATH, or as an absolute/venv path). If completion is not installed or fj is missing, Tab falls through silently.## Add skills

Point nano at skill folders (SKILL.md + frontmatter) in nano.yml:

skills:
  - ~/.soothe/skills/my-reviewer
  - ./skills/deploy
~/.soothe/skills/my-reviewer/
  SKILL.md

Powered by

fj is built on soothe-nano — tools, skills, MCP, subagents, and progressive loading, with SQLite persistence.

---
name: my-reviewer
description: Review Python PRs for style and security
---

# Reviewer

When asked to review code, check for ...

Progressive skills are on by default (compact catalog + load on demand). Tune under progressive_skills: in nano.yml.

Add MCP servers

mcp_builtins:
  - playwright

mcp_servers:
  - name: filesystem
    transport: stdio
    command: npx
    args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
    defer: true
    enabled: true

With defer: true (default), MCP tools activate on demand.

Agent features

fj is a thin CLI over soothe-nano (soothe-deepagents + soothe-sdk).

Layer Behavior
Tools Core tools at startup; deferred via search_tools
Skills Compact listings + search_skills / invoke_skill
MCP Deferred by default; activated on demand

Also included: builtin tool groups, ready subagents (planner, explorer, research, browser), workspace scoping, YAML/env config, SQLite persistence, and middleware (limits, timeouts, retries).

Compared to other agents

For a full TUI coding agent from the same stack, see mirasoth/soothe.

fj / soothe-nano soothe OpenCode Pi-style
Shape Thin one-shot CLI Full TUI + optional daemon Full TUI product (JS/TS) Minimal loops
Agent loop CoreAgent (ReAct) Strange Loop: plan → assess → execute Product agent loop Single / lean loop
Goals One query → answer Goal-oriented; autopilot multi-goal DAG Session / product UX Usually single turn
Autopilot Daemon schedule, dreaming, cron, veritas
Tools / skills / MCP Progressive Same core + TUI / loop durability Product surface Often fixed
Config nano.yml nano.yml + soothe.yml App / project config Code / light config
Best when Scriptable coding in a repo Interactive + 24/7 goal orchestration Daily interactive coding Experiments
  • vs soothe: shared CoreAgent; fj is argv → answer; soothe adds Strange Loop, TUI, and autopilot.
  • vs OpenCode: rich TUI product vs argv → answer (fj) or goal-orchestration stack (soothe).
  • vs Pi-style: lean loops vs progressive loading, workspace security, sqlite threads.

Development

git clone https://github.com/caesar0301/fj-ai.git
cd fj-ai
make sync-dev
make test
make lint

# optional local soothe-nano:
#   uv add --editable ../soothe/packages/soothe-nano
uv run fj who is your name
src/fj_ai/
  cli.py         # argv → query / setup / completion
  config.py      # nano.yml loader
  agent.py       # create_nano_agent + sqlite
  stream.py      # stdout streaming
  completion/    # Tab intent completion (fast model, no agent)
  shell/         # zsh/bash completion scripts
nano.yml
.github/workflows/
  ci.yml
  release.yml
  • CI — format, lint, tests on Python 3.11–3.13; build + twine check
  • Release — GitHub Release / workflow_dispatch → PyPI

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fj_ai-1.0.5.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fj_ai-1.0.5-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file fj_ai-1.0.5.tar.gz.

File metadata

  • Download URL: fj_ai-1.0.5.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fj_ai-1.0.5.tar.gz
Algorithm Hash digest
SHA256 2c2dc37ff3d02d0deb86455f527c1ad5e4f83839f8ac4237158536cd84972fa2
MD5 af799f5e8e7739343c911412dda7c0eb
BLAKE2b-256 97e08d7dbee5b53519ad6ed9db5d86c37f8a7a4814aa2aed8f39e217459287d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for fj_ai-1.0.5.tar.gz:

Publisher: release.yml on caesar0301/fj-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fj_ai-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: fj_ai-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 45.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for fj_ai-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 679654431a71381bd066b63ffe9d58bf62a52ae896738c32f0a5afaf318eb981
MD5 8e36adf2848894c25b42564c1257a23b
BLAKE2b-256 6d19df4f308cdf910bf24d01e5c70b1d3a6caee9579696e701a8fc5ffdba05f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for fj_ai-1.0.5-py3-none-any.whl:

Publisher: release.yml on caesar0301/fj-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page