You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A terminal-based, agentic AI coding assistant. Type code requests in natural language — it plans, executes, and remembers decisions across sessions. Works with Anthropic Claude or any OpenAI-compatible API (DeepSeek, OpenAI, Ollama, etc.).
Setup
Requirements
Node.js 20+ (uses native glob API)
npm
Install from Git (Global)
Windows
On Windows, due to an npm bug where git URL installations are sometimes created as temporary broken symlinks, it is recommended to install via the GitHub tarball URL:
npm install -g https://github.com/kashina69/justcode/tarball/master
# Or run on demand without global installation
npx https://github.com/kashina69/justcode/tarball/master
macOS / Linux
On macOS or Linux, you can install directly using the GitHub repository shortcode. If your npm is configured in a system directory (non-nvm), you may need to prefix global commands with sudo:
# Standard install (use sudo npm install -g ... if permission error occurs)
npm install -g github:kashina69/justcode
# Or run on demand without global installation
npx github:kashina69/justcode
Updating
To update justcode to the latest version, run the installation command again with the --force flag to clear the local npm cache and pull the latest commits from GitHub:
git clone https://github.com/Kashina69/justcode.git
cd justcode
npm install
npm run build
npm install -g .
Configuration
On first run, justcode will prompt for setup. You can also pre-create ~/.agent/config.json (global) or config.json in your project root (local override):
Or set environment variables: ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENAI_API_ENDPOINT.
Running
justcode # from any project folder — works on the current working directory
npm run dev # for development from project source
On startup the tool initializes a session log, loads config, preloads skill names for tab completion, and boots the interactive REPL.
What it does
justcode is an autonomous coding agent in your terminal. It reads your codebase, executes commands, modifies files, and builds structured memory of project decisions — all driven by natural language requests.
Features
Agentic task execution — reads, writes, edits, and runs shell commands in your project directory
Dynamic model routing — auto-routes prompts to fast, smart, or planner model based on query complexity using centralized routeByTaskDescription
DB Admin Agent — Interactive database administration sub-session (/db) for schema introspection, query execution (with confirm safety gate), text/Mermaid ERDs, and AI DB design engineer helper
AI Question Asker — AI agent can query the user for missing parameters/details mid-execution using checkbox menus, single-select, or text inputs via the ask_user tool
Three-tier safety gate — safe commands run silently, write commands run and are logged, only truly dangerous commands prompt y/N
Background process job handles — start_process returns a jobId; check_process / wait_process poll it — agent never re-issues the same command to check status
Non-blocking bash execution — servers and long-running commands run in the background; REPL is never blocked
Interactive CLI spinner — animated loading indicator while AI thinks or tools run
Flow logs — dim single-line trace of every internal step (skill match, model route, tool classification) printed live; toggle with /debug off
Collapsible tool output — results over 15 lines fold automatically; type e to expand the last one
Enhanced Tab Autocomplete — press Tab to complete slash commands, skill names, and file/folder locations (with gitignore-aware auto-suggestions).
Manual skill control — pin skills using /skill pin or typing @skillname in your message; mute skills using /skill mute or typing !@skillname in your message; /skill reset returns to automatic matching.
File & Line Context Injection — hyperfocus the AI on specific files or lines by writing @filepath or @filepath:lines (e.g. @src/cli/repl.ts:30-50) in your prompt to inject target file blocks directly into context.
Project memory log — session summaries appended to .agent/memory.md after every session
File safety — every file write is backed up; /undo rolls back the last change
Project context initialization — /init scans the codebase and generates .agent/project.md, .agent/agents.md, .agent/taste/project-taste.md, and .agent/modules/*.md for richer agent context on every turn
Taste system — learns user preferences (framework choices, code style, architecture patterns) with confidence scores; project taste in .agent/taste/, global taste in ~/.justcode/taste/; auto-injected into every request
External prompts & templates — all system prompts and injection glue strings in prompts/ — edit without touching code
Extensive session logging — full request/response logs written to .logs/session_*.log
Global cost history — cumulative token and cost stats in ~/.agent/usage.log; view with /cost
Centralized model routing utility based on complexity
router.ts
routeModelAlias()
Auto-routes query using routeByTaskDescription
AgentOrchestrator accepts pinnedSkills and mutedSkills sets from the CLI session state. These override the automatic skill matcher result on every turn.
src/providers/
File
Purpose
factory.ts
Resolves the correct provider instance for a model alias
anthropic.ts
Anthropic Claude API provider (streaming complete)
openai.ts
OpenAI-compatible API provider (DeepSeek, OpenAI, Ollama)
Root function: checks if onboarding needed → runs interactive setup → validates config → returns config or exits
interactive.ts
runInteractiveSetup()
Interactive provider selection and API key input flow
validate.ts
needsOnboarding()
Checks whether API keys are missing
validate.ts
validateProviderConfig()
Validates active provider credentials
src/skills/
File
Function
Purpose
loader.ts
loadSkills()
Scans skills/*/SKILL.md for custom agent behavior files
loader.ts
stripFrontmatter()
Strips YAML front-matter from skill markdown
matcher.ts
matchSkills()
Deterministic skill matching (returns all skills — classifier was removed per token-efficiency plan)
Project Data Directories
<your-project>/
.agent/
memory.md ← timeline of session summaries
project.md ← project overview, tech stack, detected features (generated by /init)
agents.md ← agent guidance for this project (generated by /init)
taste/
project-taste.md ← project-level user preferences with confidence scores (auto-updated)
modules/
<name>.md ← per-module file listing (generated by /init)
db/
config.json ← database connection settings
schema.md ← auto-generated database schema diagrams
memory/ ← database cached schema memory
memory/
index.json ← lightweight memory graph index (ids, summaries, tags)
nodes/
mem_<id>.json ← individual memory graph node files
plans/
<plan-id>.md ← active agent plans (checked off by agent)
archived/ ← completed/rejected plans
sessions/
<timestamp>_summary.md ← AI-generated prose session summary
session_<id>.json ← full conversation transcript (for resume)
session.json ← project-level cumulative cost & token stats
.logs/
session_<timestamp>.log ← full request/response debug logs
prompts/ ← all prompts, templates, skills & agent docs (loaded via PromptProvider)
agent_system.txt
ask_user_guidance.txt
db_admin_system.txt
planner_draft_system.txt
planner_critique_system.txt
plan_injection_header.txt
manual_skill_header.txt
session_summary_system.txt
skills/ ← built-in skill library (loaded at runtime)
<skill-name>/SKILL.md
agents/ ← agent specs & workflow docs (informational)
README.md
agentic_workflow.md
~/.agent/
config.json ← global API keys and model config
usage.log ← global cumulative token & cost log
theme.json ← active terminal color theme setting
~/.justcode/
taste/
global-taste.md ← global user preferences with confidence scores (auto-updated)
Development
npm run dev # run in development (tsx, no build step)
npm run build # compile TypeScript to dist/
npm run test# run all unit and integration tests
npm install -g .# install globally from local source
Model Aliases
Three aliases route requests automatically based on query complexity:
Alias
Default Model
Used For
fast
claude-3-5-haiku / deepseek-chat
Conversational queries, plan execution steps, session summaries
smart
claude-3-5-sonnet / deepseek-coder
Complex code tasks, refactoring, general agent responses
planner
claude-3-5-sonnet / deepseek-coder
/plan drafting and critiquing
Routing is keyword-based on the last user message — no extra LLM call.