A terminal-based SQLite database management tool with metadata support and organized file structure.
- Database Management: Create, open, and manage SQLite databases
- Metadata Support: Store and retrieve database descriptions, purpose, owner, and tags
- Organized Storage: All databases stored in dedicated
data/directory - Table Operations: Create, view, and manage database tables
- Query Execution: Execute custom SQL queries
- Data Management: Insert, view, and manipulate table data
- Schema Inspection: View table structures and column information
everything/
├── data/ # Database storage directory
│ └── *.db # SQLite database files (with internal metadata)
├── everything_db.py # Database class with SQLite operations
├── everything_ui.py # Terminal user interface
└── README.md # This documentation
-
Run the application:
uv run everything_ui.py
-
Choose option 1 to create or open a database
-
For new databases, provide metadata:
- Description: Brief overview of the database
- Purpose/Project: What this database is used for
- Owner/Creator: Who created/maintains it
- Tags: Comma-separated keywords for organization
- Open/Create Database - Create new or open existing database
- List All Databases - View all databases with metadata
- List Tables - Show tables in current database
- Create Table - Interactive or manual table creation
- Execute Query - Run custom SQL commands
- Show Table Schema - Display table structure
- Insert Data - Add data using column=value format
- View Table Data - Display table contents with optional limit
- Show Database Info - View current database metadata
- Close Database - Close current database connection
- Exit - Quit the application
Each database automatically stores metadata internally in a special _database_metadata table:
- Creation date
- Last modified date
- Description
- Purpose/Project
- Owner/Creator
- Tags for categorization
The metadata table is hidden from normal table operations but accessible through the metadata methods.
- Select "Create new database"
- Enter name:
inventory_system - Provide metadata:
- Description: "Store and track inventory items"
- Purpose: "E-commerce inventory management"
- Owner: "John Doe"
- Tags: "inventory, ecommerce, products"
- Select "Create Table" from menu
- Choose "Interactive table creation (guided)"
- Enter table name:
products - Define columns step by step:
- Column 1:
id(INTEGER, Primary Key, Auto Increment) - Column 2:
name(TEXT, Not Null) - Column 3:
price(REAL, Not Null) - Column 4:
quantity(INTEGER, Default: 0)
- Column 1:
- Select "Create Table" from menu
- Choose "Manual SQL definition"
- Enter table name:
products - Enter column definitions:
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
price REAL NOT NULL CHECK(price >= 0),
quantity INTEGER DEFAULT 0
Use the "Execute Query" option with SQL:
CREATE TABLE products (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
price REAL NOT NULL CHECK(price >= 0),
quantity INTEGER DEFAULT 0
)Use the "Insert Data" option with format:
name=Widget A
price=19.99
quantity=100
create_sqlite_db(metadata=None)- Create database with optional metadatacreate_sqlite_table(table_name, columns)- Create new tableinsert_into_sqlite_table(table_name, values)- Insert raw SQL valuesselect_from_sqlite_table(table_name, columns, condition)- Select with conditionupdate_sqlite_table(table_name, set_clause, condition)- Update recordsdelete_from_sqlite_table(table_name, condition)- Delete records
get_tables()- List all tables (excludes metadata table)execute_query(query)- Execute any SQL queryget_table_schema(table_name)- Get table column informationinsert_data(table_name, data)- Insert using dictionaryget_table_data(table_name, limit=10)- Retrieve table data
create_table_safe(table_name, columns)- Create table with validationtable_exists(table_name)- Check if table existsget_column_info(table_name)- Get detailed column informationvalidate_table_name(table_name)- Validate table name rules
save_metadata(metadata)- Store database metadata in internal tableget_metadata()- Retrieve database metadata from internal tableupdate_metadata(new_metadata)- Update existing metadata in internal tablelist_all_databases()- List all databases with metadata from internal storage
- uv (Python package manager)
- Python 3.12+ (managed by uv)
- sqlite3 (included in Python standard library)
- json (included in Python standard library)
- os (included in Python standard library)
- datetime (included in Python standard library)
-
Install uv:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Initialize the project:
cd everything uv sync # Sets up virtual environment and dependencies
All databases are automatically stored in the data/ directory:
- Database files:
database_name.db(includes internal metadata table)
The data directory is created automatically if it doesn't exist. Metadata is stored within each database file in a special _database_metadata table, eliminating the need for separate metadata files.
- Guided Process: Step-by-step column definition
- Flexible Data Types: Accepts common abbreviations (int, string, float, etc.)
- Constraint Support: PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT values
- Auto Increment: Available for INTEGER primary keys
- Validation: Prevents invalid table names and duplicate tables
- Real-time Feedback: Shows column definitions as you build them
- SQL Definition: Direct column definition entry
- Advanced Constraints: Support for CHECK constraints, foreign keys
- Complex Types: Full SQLite type and constraint syntax
- Preview: Shows final SQL before creation
- Reserved Words: Prevents use of SQL keywords
- System Tables: Blocks underscore-prefixed names (except metadata)
- Character Rules: Enforces valid identifier syntax
- Duplicate Check: Prevents overwriting existing tables
- INTEGER: Whole numbers, can be PRIMARY KEY with AUTOINCREMENT
- Accepts:
INTEGER,INT
- Accepts:
- TEXT: String data of any length
- Accepts:
TEXT,STRING,VARCHAR,CHAR
- Accepts:
- REAL: Floating-point numbers
- Accepts:
REAL,FLOAT,DOUBLE,DECIMAL
- Accepts:
- BLOB: Binary data
- Accepts:
BLOB,BINARY
- Accepts:
- PRIMARY KEY: Unique identifier, automatically indexed
- NOT NULL: Prevents empty values
- UNIQUE: Ensures unique values across rows
- DEFAULT: Sets default value for new rows
- CHECK: Validates data against conditions
- FOREIGN KEY: References other tables (manual SQL only)
- Formatted Tables: Clean, readable column information
- Column Details: Shows type, nullable status, keys, and defaults
- Error Handling: Clear messages for non-existent tables
- Table Suggestions: Lists available tables when one isn't found
- Input Examples: Shows format examples for data entry
- Duplicate Detection: Warns when overwriting column values
- Quote Handling: Automatically handles quoted string values
- Real-time Feedback: Confirms each column=value pair as entered
- Table Validation: Checks table existence before allowing data entry
- Context-Aware: Provides relevant suggestions based on current state
- Helpful Guidance: Shows available options when operations fail
- Clear Formatting: Well-structured error messages and warnings