Skip to content

Add vibekit to algokit cli + implement it to init #716

Open
p2arthur wants to merge 20 commits into
mainfrom
feat/vibe-algokit
Open

Add vibekit to algokit cli + implement it to init #716
p2arthur wants to merge 20 commits into
mainfrom
feat/vibe-algokit

Conversation

@p2arthur

@p2arthur p2arthur commented Mar 13, 2026

Copy link
Copy Markdown

Add algokit vibe spike + init prompt - Builds on top of decoupling branch

Hey! This PR adds a "spike" for VibeKit integration. It’s mostly opt-in for now so it doesn't break anyone's existing workflow.

What I did

New Commands: Added algokit vibe with setup and status subcommands.

setup checks if you have VibeKit, asks to install it if you don't, and then runs init.

status just checks the current VibeKit status.

Init Prompt: I added a prompt to algokit init. Now it asks if you want to set up VibeKit right away inside the new project folder.

Docs & Tests: Added a new docs page and wrote some tests to make sure the commands and the init prompt actually work.

Snapshot Fix: Had to update one init snapshot because of a small git config change.

A few notes

It's still a spike, so I kept everything optional.

I didn't add any automatic .gitignore logic for Vibe files yet—figured I'd keep it simple for this first pass.

I’m passing LocalNet context through env vars, but I made it non-blocking so it won't crash the setup if something is weird.

aorumbayev and others added 15 commits March 3, 2026 15:14
Added PyInstaller hidden imports for:
- algokit_abi, algokit_indexer_client, algokit_kmd_client (standalone packages)
- algokit_utils.algo25, algokit_utils.transact, algokit_utils.common, algokit_utils.clients (proxy modules that re-export from standalone packages)

This fixes 'No module named algokit_utils.algo25' error in portability tests.
The portability tests were inadvertently using the venv-installed algokit
instead of the PyInstaller binary because 'poetry run' prepends .venv/bin
to PATH, causing 'algokit' to resolve to the venv version.

- Add _get_algokit_binary() to explicitly find the PyInstaller binary in dist/
- Support PYINSTALLER_BINARY_PATH env var for explicit binary path
- Filter out .venv/bin (or .venv/Scripts on Windows) from PATH fallback
- Add Windows compatibility with os.pathsep and .exe extension
- Remove unused command_str_to_list function
* refactor: migrate to uv - uv as primary distribution method

* chore: regen tests

* refactor: apply uv migration review refinements

- Add UV project detection (uv pip show) to PythonClientGenerator
- Decompose bootstrap_uv into focused helper functions
- Standardize CI workflows to use composite setup-uv action
- Replace silent catch blocks with warning logs in install.ps1
- Update error message URLs to docs.astral.sh/uv/
- Use uv python find instead of grep in install.sh
- Rename PowerShell verbs to follow approved conventions
- Add debug logging for legacy command normalization
- Document sentinel version value in version_prompt.py
- Update test assertions and approval snapshots for UV-first resolution

* fix: warn on algokit PATH collisions during uv migration

* chore: pr comments
* feat: decoupling from algosdk; installing latest algokit utils

* chore: update to latest alpha 4 with get prefixes stripped from clients

* build: bump algokit-utils to 5.0.0a7

* feat(docs): initialize Starlight scaffold in docs/

Bootstrap Astro Starlight using the official template. Adds package.json,
tsconfig.json, content.config.ts, and .gitignore for the docs site.
Includes remark-github-alerts for callout box support and the AlgoKit
favicon.

* feat(docs): add astro.config.mjs with sidebar and branding

Configure Starlight for algorandfoundation.github.io/algokit-cli/ with
full sidebar structure covering tutorials, features, concepts, architecture
decisions, and auto-generated CLI reference. Adds cli-reference.css for
sphinx-click output styling.

* feat(docs): add splash home page

* feat(docs): migrate hand-written markdown content to Starlight

Move all 44 docs pages into docs/src/content/docs/ with Starlight
frontmatter, correct absolute internal links, and updated image paths.
Copy all image assets to docs/public/images/. Build produces 46 pages
cleanly.

* docs: update pyproject.toml poe tasks and dependency groups

* chore: fix .gitignore — remove bare *.md and obsolete Sphinx entry

* ci: add build-docs composite action

* ci: add check-docs workflow

* ci: add deploy-docs job to cd.yaml for GitHub Pages

* chore: remove obsolete source dirs migrated to Starlight

* fix(docs): resolve sphinx-build path

* ci: added temp preview docs for pr preview

* chore: removed git ignored files

* chore: formatted code

* fix: add build docs github action

* refactor: moved docs deps to the docs group

* chore: formatted code

* fix: linting errors

* chore: formatted code

* fix(ci): updated docs command

* docs: aligned titles in the sidebar

* chore(docs): added bash fencing to code blocks

* fix: add private key validation and standardize algokit_common imports

* chore: removed unused code and files

* fix: lint failure

---------

Co-authored-by: Altynbek Orumbayev <altynbek.orumbayev@makerx.com.au>
Co-authored-by: Daniel McGregor <daniel.mcgregor@makerx.com.au>
…ibekit if missing and run it to the generated project
@p2arthur
p2arthur changed the base branch from main to decoupling March 13, 2026 20:35
@Ganainmtech

Copy link
Copy Markdown

+1, some builders add VibeKit after algokit init (or vice versa), so being able to set it up in one go would improve the agentic dev experience or at least give builders the option while staying inside their AlgoKit project.

Comment thread poetry.lock

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be removed, decoupling branch is already on uv we likely just forgot to remove the poetry lockfile

@aorumbayev aorumbayev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for spiking on this, good initiative on making it opt-in and non-blocking 👍 see inline comments for details — my main suggestion is moving this under algokit task and removing the init integration

from algokit.cli.project.bootstrap import bootstrap_group
from algokit.cli.project.deploy import deploy_command
from algokit.cli.task import task_group
from algokit.cli.vibe import vibe_group

@aorumbayev aorumbayev Mar 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the main concern with the pr — vibekit is an external third-party tool that we're wrapping, and we already have an established namespace for exactly this: algokit task. see how ipfs, analyze, wallet etc all live under algokit task as subcommands/subgroups in src/algokit/cli/tasks/. the ipfs subgroup is the closest analogue since it's also a click group with multiple subcommands wrapping an external service.

i'd suggest:

  1. move vibe.pysrc/algokit/cli/tasks/vibe.py and register via task_group.add_command(vibe_group) in src/algokit/cli/task.py. user gets algokit task vibe setup / algokit task vibe status
  2. remove the init integration — imho the value of embedding it in init is saving the user from typing algokit task vibe setup after init, but the cost is a new prompt shown to every interactive init user, 25 lines of gating logic with an implicit run_bootstrap coupling, and a broad except Exception in a critical flow. vibekit setup is a post-init task, not a project scaffolding concern — it doesn't belong in the init flow. If you do think its worth keeping then perhaps you can print a informational message that can now invoke this task command to setup vibekit (along with a short sentence on what this tool is and how it relates to algokit)
  3. keeping it as algokit task vibe command group

Comment thread src/algokit/cli/vibe.py
VIBEKIT_INSTALL_URL = "https://getvibekit.ai/install"


@click.group("vibe", short_help="Give your AI assistant Algorand superpowers using VibeKit.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the marketing copy in the short_help feels a bit out of place compared to other command descriptions in the cli. compare with:

  • "Collection of useful tasks to help you develop on Algorand." (task)
  • "Upload files to IPFS using Pinata provider." (ipfs)
  • "Manage the AlgoKit LocalNet." (localnet)

i'd suggest something more descriptive and consistent like "Install and manage VibeKit for AI-assisted development." — tells the user what it does without the superpowers marketing

Comment thread src/algokit/cli/vibe.py
return ["sh", "-c", f"curl -fsSL {VIBEKIT_INSTALL_URL} | sh"]


def _build_vibekit_init_env() -> dict[str, str]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have this exact logic in localnet_status at src/algokit/cli/localnet.py:293-301 — it does the same sandbox.ps()ps_by_name → check state pattern. rather than duplicating it here, i'd suggest extracting a small helper into core/sandbox.py like:

def is_localnet_running() -> bool:
    """Check if the AlgoKit LocalNet services are running."""
    ...

then both localnet status and vibe can reuse it. also note you're only checking ("algod", "indexer") but the canonical service list is SERVICE_NAMES = ("algod", "conduit", "indexer-db", "indexer") defined in localnet.py:276 — worth being consistent there

also the ComposeSandbox import at module level will pull in docker/container engine deps just from importing vibe.py — localnet handles this more carefully. given that localnet context is optional (your docs say vibekit init still runs without it), a lazy import inside the try block would be safer

Comment thread src/algokit/cli/vibe.py
)
except Exception as ex:
# Context injection should never block initialization.
logger.warning("Unable to inspect AlgoKit LocalNet status; proceeding without confirmed LocalNet state.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the warning doesn't tell the user what actually went wrong — could be docker not running, permission denied, network issue etc. at minimum include the exception so the user has something actionable. something like f"Unable to inspect LocalNet status ({ex}); proceeding without confirmed LocalNet state." — we do this in other places in the cli

Comment thread src/algokit/cli/vibe.py
"""Run VibeKit setup flow."""
vibekit_cmd = _resolve_vibekit_command()
if vibekit_cmd is None:
click.echo(click.style("VibeKit not found.", fg="yellow"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we generally use logger.warning() for warning-level messages throughout the cli rather than click.echo(click.style(...)) — see how _maybe_bootstrap, localnet commands, codespace etc handle this. using logger ensures consistent formatting with verbose mode and our log handlers

and git("commit", "-m", commit_message, bad_exit_warn_message="Initial commit failed")
and git(
"-c",
"commit.gpgsign=false",

@aorumbayev aorumbayev Mar 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be done in a separate pr?

@aorumbayev aorumbayev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments above

Base automatically changed from decoupling to main May 28, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants