{"id":36473899,"url":"https://github.com/dotcommander/gokart","last_synced_at":"2026-07-15T02:01:40.843Z","repository":{"id":331992164,"uuid":"1128655288","full_name":"dotcommander/gokart","owner":"dotcommander","description":"Opinionated Go service toolkit. Thin wrappers around chi, pgx, redis, viper, cobra, and friends with sensible defaults.","archived":false,"fork":false,"pushed_at":"2026-06-23T13:51:42.000Z","size":6848,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-03T05:09:51.665Z","etag":null,"topics":["chi","cobra","go","golang","pgx","postgresql","redis","sqlite","toolkit","viper"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dotcommander.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-06T00:56:39.000Z","updated_at":"2026-06-23T13:53:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dotcommander/gokart","commit_stats":null,"previous_names":["dotcommander/gokart"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/dotcommander/gokart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcommander%2Fgokart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcommander%2Fgokart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcommander%2Fgokart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcommander%2Fgokart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotcommander","download_url":"https://codeload.github.com/dotcommander/gokart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotcommander%2Fgokart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35486961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chi","cobra","go","golang","pgx","postgresql","redis","sqlite","toolkit","viper"],"created_at":"2026-01-12T00:44:51.414Z","updated_at":"2026-07-15T02:01:40.837Z","avatar_url":"https://github.com/dotcommander.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoKart\n\n![GoKart logo](logo.png)\n\nGoKart is a modular Go toolkit for recurring infrastructure setup, safe defaults, and user-owned generated code. Its enforceable boundary is defined in [PHILOSOPHY.md](PHILOSOPHY.md).\n\n```bash\ngo install github.com/dotcommander/gokart/cmd/gokart@v0.12.0\ngokart new myapp --db sqlite --example\ncd myapp\ngo run ./cmd greet --name World\n```\n\n## Packages\n\n- `gokart`: typed configuration, platform config directories, and JSON state persistence.\n- `gokart/cli`: Cobra application construction for established ecosystem-style consumers plus process-stream presentation helpers. Focused generated CLIs use Kong directly.\n- `gokart/web`: chi router/server construction, JSON responses, bounded binding, and validation.\n- `gokart/postgres`: pgx pool setup and transaction helpers.\n- `gokart/sqlite`: zero-CGO SQLite setup and operations.\n- `gokart/migrate`: goose migrations.\n- `gokart/cache`: Redis construction, prefixes, JSON operations, and `Remember`.\n- `gokart/logger`: `log/slog` setup.\n\nAll modules isolate their dependencies. Constructors expose real upstream types or an explicit `Client` escape hatch.\n\n## Generator\n\n`gokart new` creates ordinary Go code. Plain, example, local, and global CLIs default to a flat `main.go`; selecting an integration chooses the structured layout automatically. Use `--structured` when you want the multi-package layout without an integration.\n\n```bash\ngokart new mycli\ngokart new mycli --structured\ngokart new mycli --structured --global\ngokart new service --db postgres --ai --redis\ngokart add sqlite --dry-run\n```\n\nGlobal scaffolds include a manifest, but `gokart add` supports structured projects only. Choose `--structured --global` when you want platform-global configuration and later integration updates.\n\nDependencies are pinned for deterministic generation. PostgreSQL uses `postgres.Open`, SQLite uses `sqlite.Open`, Redis uses `cache.Open`, and AI uses the official OpenAI SDK directly.\n\nSee the [generator reference](docs/components/generator.md) and [documentation index](docs/index.md).\n\n## v0.11 migration\n\n| Removed surface | Replacement |\n|---|---|\n| `ai.NewOpenAIClient(opts...)` | `openai.NewClient(opts...)` |\n| `ai.NewOpenAIClientWithKey(key)` | `openai.NewClient(option.WithAPIKey(key))` |\n| `fs.ConfigDir` / `fs.EnsureConfigDir` | `gokart.ConfigDir` / `gokart.EnsureConfigDir` |\n| `fs.WriteFile` / `fs.ReadOrCreate` | Standard library; no GoKart replacement |\n| `GetString`, `GetInt`, `GetFloat`, `GetBool` | Typed configuration parsing or caller-owned assertions |\n| Cache command mirrors | `c.Client().Command(ctx, c.Key(key), ...)` |\n| `cli.Fatal`, `cli.FatalErr`, `cli.Must` | Return errors; `main` owns `os.Exit` |\n| CLI writer overrides | Cobra `SetOut` / `SetErr` and command writers |\n| Removed web helpers | Standard library or the named upstream package directly; see `web/README.md` |\n\nNo deprecated aliases or forwarding modules are retained. Historical `v0.10.3` tags are the compatibility path.\n\n### Removed identifiers\n\nUse this searchable inventory when migrating:\n\n- Root getters: `GetString`, `GetInt`, `GetFloat`, `GetBool`.\n- Cache commands: `Get`, `Set`, `Delete`, `Exists`, `Expire`, `TTL`, `Incr`, `IncrBy`, `SetNX`, `HGet`, `HSet`, `HGetAll`, `HDel`, `HIncrBy`, `ZAdd`, `ZRange`, `ZRangeByScore`, `ZScore`, `ZRem`, `ZCard`, `SAdd`, `SRem`, `SMembers`, `SIsMember`, `LPush`, `RPush`, `LRange`, `LPop`, `RPop`, `Decr`, and `DecrBy`. Call the corresponding go-redis method through `Client`, applying `Key` to every logical key.\n- CLI process control and writers: `Fatal`, `FatalErr`, `Must`, `SetOutput`, `SetErrOutput`, `Output`, and `ErrOutput`.\n- Web assets and auth: `NewAssets`, `AssetConfig`, `Assets`, `Assets.Path`, `Assets.Handler`, `APIKeyAuth`, and `BearerAuth`.\n- Web CSRF and flash: `CSRFProtect`, `CSRFProtectWithOrigins`, `SetFlash`, `GetFlash`, `FlashFromContext`, `FlashMiddleware`, `FlashLevel`, `FlashMessage`, `FlashSuccess`, `FlashError`, `FlashWarning`, and `FlashInfo`.\n- Web health and clients: `HealthHandler`, `ReadyHandler`, `HealthCheck`, `HealthFunc`, `NewHTTPClient`, `NewStandardClient`, and `HTTPConfig`.\n- Web negotiation and pagination: `WantsJSON`, `IsHTMX`, `Negotiate`, `NegotiateStatus`, `ParsePage`, `ParsePageWithConfig`, `NewPagedResponse`, `Page`, `PageConfig`, and `PagedResponse`.\n- Web rate limiting: `RateLimit`, `RateLimitWithKey`, `RateLimitWithEviction`, `WithTTL`, `WithSweepInterval`, `RateLimiter`, `RateLimiter.Middleware`, `RateLimiter.LimiterCount`, `RateLimiter.Stop`, and `RateLimitOption`.\n- Web templ adapters: `Render`, `RenderCtx`, `RenderWithStatus`, `TemplHandler`, `TemplHandlerFunc`, and `TemplHandlerFuncE`.\n\n## Verification\n\nGo 1.26 or later is required.\n\n```bash\njust verify\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcommander%2Fgokart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotcommander%2Fgokart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotcommander%2Fgokart/lists"}