🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

practicode

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

practicode

Local-first coding-test practice in a Rust terminal UI with optional AI help.

Source
npmnpm
Version
0.1.7
Version published
Weekly downloads
4.3K
Maintainers
1
Weekly downloads
 
Created
Source

practicode

Rust Ratatui Local first AI ready CI

practicode terminal UI

Personal coding practice, right in your terminal.

practicode is a small Rust TUI for stdin/stdout practice: problem on the left, code on the right, judge loop in the same terminal.

What You Get

  • Local stdin/stdout judging for Python, TypeScript, Java, and Rust.
  • A two-pane terminal UI with problem text, editor, output, and command palette.
  • Local-first problem history under ignored .practicode/, problems/, and submissions/ paths.
  • Optional Codex or Claude Code help for hints and generated next problems.

Install

Prerequisites

  • Node.js 18+ for npm installation.
  • Rust and Cargo. The npm package builds the Rust binary during install, and also on first run if needed.
  • A runtime for the language you practice in: Python, Node.js for TypeScript, JDK for Java, or Rust.

npm

npm install -g practicode
practicode

Cargo

cargo install practicode
practicode

Local checkout

git clone https://github.com/baba9811/practicode.git
cd practicode
npm install
npm start

Check Install

practicode --version
practicode --smoke
practicode --help

Daily Loop

The code editor starts focused.

write code
Esc, then /
choose /run
choose /next when it passes

Typing / outside the editor opens the command palette. Use up/down to move, Enter to run or complete the selected command, and Esc to cancel. Press ? for in-app help or Ctrl+C to quit.

Submissions are saved as you type under submissions/<problem-id>/solution.<ext>.

CLI Flags

FlagAction
--help, -hShow non-interactive help
--version, -VPrint the installed version
--smokePrint the current problem title and exit

Commands

CommandAction
/runJudge the current submission
/codeReturn to the code editor
/nextOpen the next unsolved problem, or ask AI only when none remain
/generate easy string problemAsk AI to create a new problem now
/backGo back through problem history
/problemsBrowse problems with up/down or j/k, open with Enter
/open 2Open by number, id, or slug
/answerShow the reference answer
/hintAsk the selected AI for a concise hint
/hint explain my bugAsk the selected AI about the current problem and submission
/profileShow your current practice profile
/difficulty autoSet difficulty preference: auto, easy, medium, hard
/topics arrays, stringsSet preferred topics for future problems
/avoid dp, graphSet topics to avoid in future problems
/provider codexSet AI provider and show local CLI/daemon status
/model autoUse the provider default model for /hint and AI-backed /next
/language pythonSet code language: python, ts, java, rust
/ui enSet UI language: en, ko, ja, zh, es
/theme darkSet theme: dark or light
/updateShow update instructions when a newer version is available
/exitQuit

Older command names such as /prev, /list, /giveup, and /lang still work as aliases.

The default UI language is English. Switch it any time with /ui ko, /ui ja, /ui zh, or /ui es.

Your practice profile is saved in .practicode/problem-state.json. It keeps UI language, code language, theme, preferred difficulty, preferred topics, and topics to avoid. auto difficulty follows gradual progression; a fixed difficulty asks local selection and AI generation to prefer that level.

Problem Flow

/next is local-first: it opens the next unsolved local problem before generating anything. When no unsolved problem remains, it asks the selected AI provider to create one.

Use /generate <request> when you explicitly want to create a new problem now.

/generate a slightly harder string problem
/generate hashmap practice, easy
/generate sorting problem, no graph yet

Codex is the default provider:

/provider codex
/model auto

Claude Code is also supported:

/provider claude
/model sonnet

Generated problems and submissions stay local:

PathPurpose
.practicode/problem_bank.jsonLocal/custom/generated problems
.practicode/problem_notes.mdOptional personal problem-generation notes
.practicode/problem-state.jsonCurrent problem, history, settings
problems/Generated problem markdown/index files
submissions/Your answer files

Those paths are ignored by git, so your practice history stays yours.

Update

The app checks for newer npm releases in the background and shows /update in the status line when one is available. Disable that check with PRACTICODE_NO_UPDATE_CHECK=1.

npm update -g practicode
cargo install --force practicode

Safety And Security

  • /run executes your local submission as a normal process. practicode runs it from .practicode/build/<problem-id>/run, but this is not an OS sandbox. Only run code you trust.
  • /hint sends the current problem and submission to the selected AI provider CLI.
  • AI-backed /next can run a custom shell command from settings.ai_next_command; save only commands you trust.
  • Local .env, .npmrc, .practicode/, problems/, and submissions/ are ignored by git. Do not commit tokens, private prompts, or answer keys.

Development Checks

cargo test
cargo run -- --smoke
cargo audit

This repo has no npm dependencies or lockfile today, so npm audit and pnpm audit are not applicable until a matching lockfile is added.

Contributing

External contributions use the fork and pull request flow in docs/CONTRIBUTING.md.

Maintainer-only review and release notes live in docs/MAINTAINING.md.

Code layout and extension boundaries live in docs/ARCHITECTURE.md.

License

practicode is MIT licensed. Third-party dependency license notes are in THIRD_PARTY_LICENSES.md.

Keywords

algorithms

FAQs

Package last updated on 05 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts