A command-line tool for managing sessions, commands, and todos. Designed to organize workflows, track tasks, and execute saved commands.
Craifter empowers users to create, manage, and automate command-line tasks through organized "sessions." It combines task tracking (todos) with executable command storage, enabling efficient workflow automation for developers, sysadmins, and productivity enthusiasts.
This project was created to address the need for deeper automation of AI-assisted tasks on the command line. While AI systems like Grok can generate commands and ideas, executing and organizing them into reusable workflows often requires manual effort. Craifter provides a structured way to save, track, and replay commands generated by AI, reducing repetitive work and enhancing productivity. It evolved from a desire to make AI-generated scripts persistent and executable, turning one-off suggestions into automated sessions.
- Session Management: Create and organize projects with persistent storage.
- Command Execution: Save and run shell commands within sessions.
- Todo Tracking: Manage tasks with priorities and statuses.
- Playback & Automation: Review and execute saved workflows.
- Command-Line Interface: Full CLI support with interactive and direct modes.
- Persistence: Sessions and commands saved to disk for reuse.
- C++17 compatible compiler (e.g., g++ 7+, clang 5+, MSVC 2017+)
- CMake (optional, for build systems)
- Standard library with filesystem support
sudo apt update
sudo apt install g++ make
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++ -std=c++17 -o craifter main.cpp
sudo mv craifter /usr/bin/craifter
mkdir -p /root/craifter/sessionssudo dnf install gcc-c++ make # or yum for older
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++ -std=c++17 -o craifter main.cpp
sudo mv craifter /usr/bin/craifter
mkdir -p /root/craifter/sessionssudo pacman -S gcc make
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++ -std=c++17 -o craifter main.cpp
sudo mv craifter /usr/bin/craifter
mkdir -p /root/craifter/sessions# Install compiler (same as above for your distro)
# For cross-compilation if needed: sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++ -std=c++17 -o craifter main.cpp # Or use aarch64-linux-gnu-g++ for cross
sudo mv craifter /usr/bin/craifter
mkdir -p /root/craifter/sessions- Install MinGW-w64: Download from https://www.mingw-w64.org/ or use MSYS2.
- Open MinGW terminal.
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++ -std=c++17 -o craifter.exe main.cpp
# Move to PATH, e.g., C:\Windows\System32\craifter.exe
# Create sessions dir: mkdir C:\Users\YourUser\craifter\sessions- Install Visual Studio with C++ support.
- Open Developer Command Prompt.
git clone https://github.com/[your-username]/craifter.git
cd craifter
cl /std:c++17 main.cpp /Fe:craifter.exe
# Move to PATH
# Create sessions dir as abovexcode-select --install # Install command line tools
git clone https://github.com/[your-username]/craifter.git
cd craifter
clang++ -std=c++17 -o craifter main.cpp
sudo mv craifter /usr/local/bin/craifter
mkdir -p /Users/youruser/craifter/sessions # Adjust path in code if neededbrew install gcc
git clone https://github.com/[your-username]/craifter.git
cd craifter
g++-11 -std=c++17 -o craifter main.cpp # Use installed gcc
sudo mv craifter /usr/local/bin/craifter
mkdir -p /Users/youruser/craifter/sessions- Ensure a C++17 compiler is installed (check with
g++ --versionor equivalent). - Clone:
git clone https://github.com/[your-username]/craifter.git - Compile:
g++ -std=c++17 -o craifter main.cpp(replaceg++with your compiler, e.g.,clang++) - Move binary to a directory in your PATH (e.g.,
/usr/local/bin/on Unix-like, or add to PATH on Windows). - Create sessions directory:
mkdir -p /path/to/craifter/sessionsand update the path inmain.cppif needed. - If filesystem library issues, ensure your compiler/standard library supports
<filesystem>(e.g., link with-lstdc++fson older GCC).
Run Craifter interactively: craifter
Or use command-line arguments: craifter [--sessions-dir <path>] <command>
- Default Sessions Directory:
~/.craifter/sessions - Config File:
~/.craifter/configwithsessions_dir=/path/to/sessions - Command-Line Flag:
--sessions-dir /path/to/sessions(overrides config) - Priority: Flag > Config > Default
craifter addtodo fix_bug "Fix login issue" high
craifter showtodos
craifter updatetodo fix_bug completedcraifter newsession deploy_app
craifter savecommand deploy_app "git add ."
craifter savecommand deploy_app "git commit -m 'Auto-commit'"
craifter savecommand deploy_app "git push origin main"
craifter savenote deploy_app "Deployment workflow for app updates"
craifter playback deploy_app # View saved commands and notes
craifter runproject deploy_app # Execute the commandscraifter listsessions
craifter newsession new_projectRun craifter help for a detailed command reference:
Craifter - Session and Task Management Tool
Purpose: Manage tasks, sessions, and commands with persistence and execution.
Commands:
addtodo <id> <task> [priority] - Add a new todo item. Priority: low/medium/high (default: medium).
Purpose: Track individual tasks. Example: craifter addtodo fix_bug 'Fix login issue' high
updatetodo <id> <status> - Update a todo's status. Status: pending/in_progress/completed.
Purpose: Mark task progress. Example: craifter updatetodo fix_bug completed
showtodos - Display all current todos.
Purpose: Review pending/in-progress tasks. Example: craifter showtodos
newsession <name> - Create a new session (project) for organizing commands and notes.
Purpose: Start a new workflow container. Example: craifter newsession web_deployment
savecommand <session> <cmd> - Save a command to a session for later execution.
Purpose: Store repeatable actions. Example: craifter savecommand web_deployment 'git push origin main'
savenote <session> <note> - Save a note or description to a session.
Purpose: Add context or documentation. Example: craifter savenote web_deployment 'Deploy to production server'
playback <session> - Display saved commands and notes for a session.
Purpose: Review session contents. Example: craifter playback web_deployment
listsessions - List all available sessions.
Purpose: See active projects. Example: craifter listsessions
runproject <session> - Execute saved commands for a session (with playback).
Purpose: Automate session tasks. Example: craifter runproject web_deployment
exit - Exit the interactive mode.
Purpose: Close the tool. Example: craifter exit
Usage: craifter <command> or run interactively.
Contributions are welcome! Please fork the repo, make changes, and submit a pull request. For major features, open an issue first.
This software is provided "as is" without warranty of any kind, express or implied. The authors are not liable for any damages, losses, or issues arising from its use, including but not limited to data loss, system failures, or any other consequences.
This project is licensed under the MIT License - see the LICENSE file for details.