{"id":21703875,"url":"https://github.com/shinokada/spt","last_synced_at":"2026-01-19T22:09:24.048Z","repository":{"id":138588017,"uuid":"415221374","full_name":"shinokada/spt","owner":"shinokada","description":"A Bash script for Simple Debian Tool. ","archived":false,"fork":false,"pushed_at":"2026-01-16T20:27:49.000Z","size":175,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-17T04:59:24.820Z","etag":null,"topics":["bash-script","cli","debian","debian-packaging","package-manager","ubuntu"],"latest_commit_sha":null,"homepage":"https://spt.codewithshin.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinokada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-09T06:19:02.000Z","updated_at":"2024-03-19T14:07:24.000Z","dependencies_parsed_at":"2024-03-18T19:28:26.103Z","dependency_job_id":"bdc4c773-0e5a-404e-b00b-fbc27e4ec3db","html_url":"https://github.com/shinokada/spt","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/shinokada/spt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinokada%2Fspt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinokada%2Fspt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinokada%2Fspt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinokada%2Fspt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinokada","download_url":"https://codeload.github.com/shinokada/spt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinokada%2Fspt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","cli","debian","debian-packaging","package-manager","ubuntu"],"created_at":"2024-11-25T21:36:27.457Z","updated_at":"2026-01-19T22:09:24.042Z","avatar_url":"https://github.com/shinokada.png","language":"Shell","funding_links":["https://ko-fi.com/Z8Z2CHALG'"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href='https://ko-fi.com/Z8Z2CHALG' target='_blank'\u003e\u003cimg height='42' style='border:0px;height:42px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=3' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Simple Package Tool (SPT)\n\nA streamlined command-line tool for creating Debian packages from GitHub repositories.\n\n[Read more about Debian packaging](https://betterprogramming.pub/how-to-create-a-basic-debian-package-927be001ad80)\n\n## Table of Contents\n\n- [Simple Package Tool (SPT)](#simple-package-tool-spt)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Requirements](#requirements)\n    - [Essential](#essential)\n    - [Recommended](#recommended)\n    - [Quick Setup](#quick-setup)\n  - [Installation](#installation)\n  - [Quick Start](#quick-start)\n  - [Commands](#commands)\n    - [`spt create [options] username/repo`](#spt-create-options-usernamerepo)\n    - [`spt generate [options]`](#spt-generate-options)\n    - [`spt install`](#spt-install)\n    - [`spt open`](#spt-open)\n    - [`spt list`](#spt-list)\n    - [`spt clean [options]`](#spt-clean-options)\n  - [Workflow](#workflow)\n  - [Repository Structure](#repository-structure)\n  - [Package Structure](#package-structure)\n  - [Customizing Packages](#customizing-packages)\n    - [Adding Dependencies](#adding-dependencies)\n    - [Common Dependencies](#common-dependencies)\n  - [Troubleshooting](#troubleshooting)\n    - [\"Could not find repository or it has no releases\"](#could-not-find-repository-or-it-has-no-releases)\n    - [\"Unable to clone repository\"](#unable-to-clone-repository)\n    - [\"Missing DEBIAN/control file\"](#missing-debiancontrol-file)\n    - [Package fails lintian checks](#package-fails-lintian-checks)\n  - [Bash Completion](#bash-completion)\n  - [Man Pages](#man-pages)\n  - [Testing](#testing)\n  - [Tips](#tips)\n  - [Examples](#examples)\n    - [Complete workflow](#complete-workflow)\n    - [CI/CD automation](#cicd-automation)\n  - [Contributing](#contributing)\n  - [Author](#author)\n  - [License](#license)\n  - [Changelog](#changelog)\n    - [v0.2.0](#v020)\n    - [v0.0.9](#v009)\n\n## Features\n\n- 🚀 One-command package creation from GitHub repos\n- 🔍 Automatic version detection from releases\n- 🏗️ Smart architecture detection\n- 📦 VSCode integration for editing\n- ✅ Package validation with lintian\n- 🔄 HTTPS/SSH fallback for cloning\n- 📊 Cache management (list/clean)\n- 🎯 Dry-run mode for testing\n- 💡 Interactive and automated modes\n- ⌨️ Bash completion support\n\n## Requirements\n\n### Essential\n- **Linux/Debian** or **macOS** (with Homebrew)\n- **curl** - API calls\n- **dpkg** - Package building (`brew install dpkg` on macOS)\n- **git** - Repository cloning\n- **GitHub CLI (gh)** - Authentication ([installation](https://github.com/cli/cli#installation))\n\n### Recommended\n- **jq** - Better JSON parsing\n- **lintian** - Package validation\n- **VSCode** - Package editing\n\n### Quick Setup\n\n```bash\n# Debian/Ubuntu\nsudo apt install curl dpkg git jq lintian\n\n# macOS (note: gh is already included above)\nbrew install curl dpkg git jq gh\n\n# Install GitHub CLI on Debian/Ubuntu\n# See: https://github.com/cli/cli#installation\ncurl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg\necho \"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main\" | sudo tee /etc/apt/sources.list.d/github-cli.list \u003e /dev/null\nsudo apt update\nsudo apt install gh\n\n# Authenticate with GitHub (both platforms)\ngh auth login\n```\n\n## Installation\n\nDownload from [releases](https://github.com/shinokada/spt/releases):\n\n```bash\n# awesome package manager https://awesome.codewithshin.com/\nawesome install shinokada/spt\n\n# Homebrew\nbrew install shinokada/spt/spt\n\n# Debian (replace X.X.X with version)\ncurl -LO https://github.com/shinokada/spt/releases/download/vX.X.X/spt_X.X.X-X_all.deb\n\n# Install\nsudo apt install ./spt_X.X.X-X_all.deb\n```\n\n## Quick Start\n\n```bash\n# Create package from GitHub repo\nspt create username/repo\n\n# Edit dependencies (optional)\nspt open  # Opens in VSCode\n# Edit DEBIAN/control to add: Depends: bash (\u003e= 4.0), curl\n\n# Generate .deb file\nspt generate\n\n# Test locally\nspt install\n```\n\n## Commands\n\n### `spt create [options] username/repo`\n\nCreates a pre-package from a GitHub repository.\n\n**Options:**\n- `-c, --code` - Open in VSCode after creation\n- `-y, --yes` - Skip interactive prompts\n- `-h, --help` - Show help\n\n**Example:**\n```bash\nspt create shinokada/teffects\nspt create -cy username/repo  # Non-interactive + open in VSCode\n```\n\n### `spt generate [options]`\n\nGenerates a .deb package from the pre-package.\n\n**Options:**\n- `-d, --dry-run` - Preview without building\n- `-o, --output DIR` - Custom output directory\n- `-h, --help` - Show help\n\n**Example:**\n```bash\nspt generate\nspt generate --dry-run  # Test first\nspt generate -o /tmp/packages  # Custom location\n```\n\n### `spt install`\n\nInstalls the generated .deb package locally.\n\n```bash\nspt install\n```\n\n### `spt open`\n\nOpens the pre-package in VSCode (or $EDITOR).\n\n```bash\nspt open\n```\n\n### `spt list`\n\nLists all cached packages (pre-packages and .deb files).\n\n```bash\nspt list\n```\n\n### `spt clean [options]`\n\nCleans the cache directory.\n\n**Options:**\n- `-f, --force` - Skip confirmation\n\n```bash\nspt clean\nspt clean -f  # Force clean\n```\n\n## Workflow\n\n```bash\n# 1. Create pre-package\nspt create username/repo\n\n# 2. Edit dependencies (DEBIAN/control)\nspt open\n# Add: Depends: bash (\u003e= 4.0), curl, jq\n\n# 3. Generate .deb\nspt generate\n\n# 4. Test locally\nspt install\n\n# 5. Distribute via GitHub releases\ngh release create v1.0.0 ~/.cache/spt/deb/*.deb\n```\n\n## Repository Structure\n\nYour GitHub repository should be structured like this:\n\n```text\nyour-repo/\n├── repo-name          # Main executable (same name as repo)\n├── lib/              # Supporting files (optional)\n│   ├── module1.sh\n│   └── module2.sh\n├── README.md\n└── LICENSE\n```\n\n**Important:**\n- Main executable must match repository name\n- It will be installed to `/usr/bin/`\n- Supporting files go to `/usr/share/repo-name/`\n- Update script paths to reference `/usr/share/repo-name/`:\n\n```bash\n# In your main script\nscript_dir=\"/usr/share/repo-name\"\nsource \"$script_dir/lib/module.sh\"\n```\n\n## Package Structure\n\nSPT creates this structure:\n\n```text\n~/.cache/spt/\n├── pkg/              # Pre-packages (editable)\n│   └── repo_1.0.0-1_all/\n│       ├── DEBIAN/\n│       │   ├── control\n│       │   └── preinst\n│       └── usr/\n│           ├── bin/repo\n│           └── share/repo/\n└── deb/              # Generated .deb files\n    └── repo_1.0.0-1_all.deb\n```\n\n## Customizing Packages\n\n### Adding Dependencies\n\nEdit `DEBIAN/control` after running `spt create`:\n\n```text\nPackage: myapp\nVersion: 1.0.0\nArchitecture: all\nMaintainer: Your Name \u003cyour@email.com\u003e\nDepends: bash (\u003e= 4.0), curl, jq\nHomepage: https://github.com/username/myapp\nDescription: Short description\n Longer description here.\n Multiple lines supported.\n```\n\n### Common Dependencies\n\n```text\nDepends: bash (\u003e= 4.0)                    # For bash scripts\nDepends: bash (\u003e= 4.0), curl, jq, git    # With external tools\n```\n\n## Troubleshooting\n\n### \"Could not find repository or it has no releases\"\n- Ensure repository has at least one release with a version tag (v1.0.0 or 1.0.0)\n- Check repository is public or you're authenticated with `gh auth status`\n\n### \"Unable to clone repository\"\n- Run `gh auth login` to authenticate\n- Verify repository exists and is accessible\n\n### \"Missing DEBIAN/control file\"\n```bash\nspt clean\nspt create username/repo\n```\n\n### Package fails lintian checks\n- Edit pre-package: `spt open`\n- Add missing dependencies to `DEBIAN/control`\n- Check file permissions are correct\n\n## Bash Completion\n\nInstall completion support:\n\n```bash\n# System-wide\nsudo cp completions/spt-completion.bash /etc/bash_completion.d/spt\n\n# User-only\nmkdir -p ~/.local/share/bash-completion/completions\ncp completions/spt-completion.bash ~/.local/share/bash-completion/completions/spt\n\n# Reload shell\nsource ~/.bashrc\n```\n\nUsage:\n```bash\nspt \u003cTAB\u003e              # Shows commands\nspt create -\u003cTAB\u003e      # Shows flags\n```\n\n## Man Pages\n\n```bash\n# Install\nsudo cp man/spt.1 /usr/share/man/man1/\nsudo mandb\n\n# View\nman spt\n\n# Or view without installing\nman ./man/spt.1\n```\n\n## Testing\n\n```bash\n# Run unit tests\n./tests/run_tests.sh\n\n# Run integration tests\n./tests/integration_tests.sh\n```\n\nSee `tests/README.md` for details.\n\n## Tips\n\n1. Install `jq` for better error messages and reliability\n2. Always test with `spt install` before distributing\n3. Use semantic versioning for releases (v1.0.0, v1.0.1, etc.)\n4. Run `spt generate --dry-run` to preview before building\n5. Clean cache regularly with `spt clean`\n\n## Examples\n\n### Complete workflow\n```bash\n# Create and open in VSCode\nspt create -c username/awesome-tool\n\n# Edit DEBIAN/control, add dependencies\n# Depends: bash (\u003e= 4.0), curl, jq\n\n# Preview\nspt generate --dry-run\n\n# Build\nspt generate\n\n# Test\nspt install\n\n# List packages\nspt list\n```\n\n### CI/CD automation\n```bash\n# Non-interactive mode\nspt create -y username/repo\nspt generate -o ./dist\n```\n\n## Contributing\n\nContributions welcome! See `CONTRIBUTING.md` for guidelines.\n\n## Author\n\nShinichi Okada\n\n## License\n\nSee LICENSE file.\n\n## Changelog\n\n### v0.2.0\n- Added `list` and `clean` commands\n- Added `--yes` flag for non-interactive mode\n- Added `--dry-run` and `--output` options\n- Improved error messages and validation\n- Added HTTPS/SSH fallback for cloning\n- Added automatic architecture detection\n- Enhanced lintian integration\n- Better JSON parsing with jq support\n- Removed unnecessary sudo requirements\n\n### v0.0.9\n- Initial release\n- Basic create, generate, and install commands\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinokada%2Fspt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinokada%2Fspt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinokada%2Fspt/lists"}