festival
Festival Methodology: fest and camp CLI integration and methodology guidance.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Obedience-Corp/festival with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Obedience-Corp/festival'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/obedience-corp--festival)HTML
<a href="/listings/obedience-corp--festival"><img src="/api/listings/obedience-corp--festival/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Replace the brackets and paste this into your coding agent. It will install Festival if needed, create one camp, and link your existing repository. Git is required.
Help me set up Festival for this goal: [what you want done and how you'll know it worked]. My existing repository is at: [full local path]. If `camp`, `fest`, or `festival` is missing, install Festival. On macOS with Homebrew, use `brew install --cask Obedience-Corp/tap/festival`. On macOS or Linux with Node.js, use `npm install -g @obedience-corp/festival`. On Windows x64, install Scoop, then run `scoop install git`, `scoop bucket add obedience https://github.com/Obedience-Corp/scoop-bucket`, and `scoop install obedience/festival` in PowerShell. After installing, run `festival doctor` to check the install. Use the installer that owns the suite for updates. For Scoop, run `scoop update festival`. For a Festival-managed install, run `festival update` without `--force`. Ask me for a camp name, a one-line description, and a mission. Create the camp with `camp create <name> -d "<description>" -m "<mission>"`. Read `camp create --help` before adding flags. Use `camp create` for this. Do not run `camp init` or `festival setup`. Use the camp path printed by the command (by default, `~/campaigns/<name>`). Set up navigation for my shell, adding the following lines to its config only if they are missing. For zsh or bash, use `eval "$(camp shell-init <shell>)"` and `eval "$(fest shell-init <shell>)"`, replacing `<shell>` with `zsh` or `bash`. For fish, use `camp shell-init fish | source` and `fest shell-init fish | source`. For PowerShell 5.1 or 7, add `Invoke-Expression (& camp shell-init powershell | Out-String)` and `Invoke-Expression (& fest shell-init powershell | Out-String)` to `$PROFILE`. Tell me to open a new terminal and run `csw <name>`; you can keep working from the camp root. From the camp root, run `camp project link <full-local-repo-path> --yes`. This leaves the repository in place, links it under `projects/`, and adds a `.camp` attachment file to it. Read the camp and project instructions, then use `fest understand` to learn the workflow. Skills are optional. Create a festival for my goal, link it to the project with `fest link` from the festival directory, and run the `fest next` loop. Ask me when you need a decision. Show me the festival path so I can follow progress, and leave the results and verification evidence ready for review.
The [agent setup guides](https://docs.fest.build/getting-started/agents/) cover optional skills and integrations for your tool.
<details> <summary>Prefer to set up manually?</summary>
Choose one method. Each installs `camp`, `fest`, and the `festival` manager.
**macOS with Homebrew**
brew install --cask Obedience-Corp/tap/festival
**macOS or Linux with Node.js**
npm install -g @obedience-corp/festival
**Windows x64 with Scoop (PowerShell)**
Install [Scoop](https://scoop.sh/) first, then run:
scoop install git scoop bucket add obedience https://github.com/Obedience-Corp/scoop-bucket scoop install obedience/festival
Windows supports local Camp and Fest work. `camp sync --from`, `camp clone --from`, and artifact transfer to or from another camp are not available in this release.
Check the install and create one camp:
festival doctor camp create my-camp
`camp create` asks for a description and mission. By default, it creates your camp at `~/campaigns/my-camp`. Enter the path printed by the command and link a repository you already use:
cd ~/campaigns/my-camp camp project link /path/to/your-existing-repo
Replace the repository path with its full local path. Your repository stays where it is. Camp links it under `projects/` and adds a `.camp` attachment file to the repository. You can also [clone a project into the camp](https://docs.fest.build/cli-reference/camp/camp_project_add/).
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 20 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- {
- "name": "festival",
- "description": "Festival Methodology: fest and camp CLI integration and methodology guidance.",
- "owner": {
- "name": "Obedience Corp",
- "url": "https://obediencecorp.com"
- },
- "plugins": [
- {
- "name": "festival",
- "description": "Festival Methodology: goal-oriented project management for human-AI development workflows. Provides fest and camp CLI integration, automatic installation, and methodology guidance.",
- "version": "1.4.1",
- "source": "./claude-plugin",
- "author": {
- "name": "Obedience Corp",
- "url": "https://obediencecorp.com"
- }
- }
- ]
- }
README.md · README · 541 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # Festival: A vibe engineering framework
- 
- <p align="center"><a href="https://github.com/Obedience-Corp/festival"><img src="https://img.shields.io/github/stars/Obedience-Corp/festival?style=social" alt="Star Festival on GitHub"></a> <a href="https://github.com/Obedience-Corp/festival"><img src="https://img.shields.io/badge/built%20with-Festival-7c3aed.svg" alt="Built with Festival"></a>
- </p>
- Vibe coding is a fast way to explore an idea, build a demo, or recreate
- something familiar. When you go beyond the demo, build something new, or work
- where a mistake could cost millions, you need more control over how the work
- gets done.
- **Vibe engineering means turning AI-assisted work into a process you can
- inspect, improve, and delegate repeatedly.** You define the outcome, review
- important decisions, and check the evidence behind the result. The aim is to
- let agents carry more of the work without having to babysit every step.
- Festival gives you the tools to build that process through **templates and
- configuration**: **Fest** for long-term goals and automated planning, **Camp**
- for shared context across sessions, and **Obey** for oversight and background
- orchestration. You shape how agents work, see where they need attention, and
- refine the process for the next run. Plans, decisions, progress, and checks stay
- in files and Git, so you can inspect the work and continue in another session.
- [Install Festival](#install-festival) · [Install Festival App](#install-festival-app) · [Try it on one real goal](#get-started) · [See a completed build](#see-festival-in-action) · [How it works](#how-the-components-fit-together) · [简体中文](README.zh-CN.md)
- ## Install Festival
- Choose one method for your system. Each installs the `festival` manager,
- `fest` for planning, and `camp` for managing workspaces. You’ll also need Git.
- **macOS with Homebrew**
- ```bash
- brew install --cask Obedience-Corp/tap/festival
- ```
- **macOS or Linux with Node.js 18 or later**
- ```bash
- npm install -g @obedience-corp/festival
- ```
- **Windows x64 with Scoop (PowerShell)**
- Install [Scoop](https://scoop.sh/) first, then run these commands in PowerShell.
- ```powershell
- scoop install git
- scoop bucket add obedience https://github.com/Obedience-Corp/scoop-bucket
- scoop install obedience/festival
- ```
- Check that the suite is ready from your terminal.
- ```sh
- festival doctor
- ```
- For native Linux packages and other install methods, see the
- [installation guide](https://docs.fest.build/getting-started/installation/).
- ## Install Festival App
- Festival App is an optional desktop terminal for the same repositories and plans
- you use with the CLI. Arrange terminals, files, and browser views in split panes,
- or open Festival Activity to see what changed across your projects.
- With Festival v0.3.34 or later installed, run this command as your regular user.
- ```sh
- festival install app
- ```
- If `app` is an unknown target, check `festival version` and update Festival
- using the package manager you installed it with.
- You can also [download Festival App directly](https://fest.build/app#download).
- See [Licensing](#licensing) for the terms that apply to the desktop app.
- [](https://fest.build/app#walkthrough)
- ## See Festival in action
- Three completed festivals built the [CodeSignal Practice Simulator](https://github.com/Festival-Examples/codesignal-practice-simulator).
- Agents followed the `fest next` loop, with testing and review gates feeding
- findings back into fixes. The demo repository includes the plans, tasks,
- review findings, and verification evidence for each build.
- <p align="center">
- <a href="https://github.com/Festival-Examples/codesignal-practice-simulator/tree/main/festivals/codesignal-browser-assessment-simulator-CB0001"><img src="https://raw.githubusercontent.com/Festival-Examples/codesignal-practice-simulator/main/festivals/codesignal-browser-assessment-simulator-CB0001/codesignal-browser-assessment-simulator-CB0001.gif" alt="Festival execution replay: six phases advance to completion." width="440"></a>
- </p>
- [Explore the demo](https://github.com/Festival-Examples/codesignal-practice-simulator) ·
- [Inspect the three festivals](https://github.com/Festival-Examples/codesignal-practice-simulator/tree/main/festivals) ·
- [Watch all three replays](https://github.com/Festival-Examples/codesignal-practice-simulator#how-this-was-built)
- **Start with one goal in a repository you already use.** Keep your existing
- coding agent, let it help set up Camp and Fest, and review the result. Add Obey
- when you want the daemon to manage execution.
- [Set up with your agent](#get-started) · [Configure Obey](https://docs.fest.build/obey/getting-started/)
- ## How the components fit together
- ```mermaid
- flowchart TB
- accTitle: How Festival components work together
- accDescr: Fest supplies plans and tracks progress. Camp shares saved context across sessions. Obey launches and supervises agents through a background daemon. All three work with your agent sessions.
- subgraph festival["Festival: templates + configuration"]
- fest["Fest<br/>Long-term goals<br/>Automated planning"]
- camp["Camp<br/>Shared context<br/>Across agent sessions"]
- obey["Obey<br/>Overseer<br/>Background daemon"]
- end
- agents["Agent sessions<br/>Your providers and models"]
- fest <-->|Tasks and progress| agents
- camp <-->|Read and record context| agents
- obey -->|Launch and supervise| agents
- ```
- | Component | What it makes possible |
- | --- | --- |
- | [Fest](https://docs.fest.build/methodology/overview/) | **Long-term goals and automated planning.** Guides agents through planning workflows, breaks goals into phases and tasks, and tracks execution through review and approval gates. |
- | [Camp](https://docs.fest.build/methodology/campaigns/) | **Shared context and context management.** Organizes projects, worktrees, research, decisions, and work items so successive agent sessions can pick up the same work. |
- | [Obey](https://docs.fest.build/obey/) | **Oversight and background orchestration.** Runs a local daemon that tracks agent sessions, launches and supervises supported providers, and drives festival execution. Its companion `ob` CLI provides planning, review, and other developer commands. |
- A **camp** is the workspace around your goals. A **festival** is a larger goal
- inside it. Each camp can have its own projects, knowledge, templates, and
- working practices. Switch camps with `camp switch` (`csw`); a new agent session
- can read the saved plans and decisions before continuing the work.
- You can use Camp and Fest directly with an agent that reads files and runs
- commands, including Claude Code, Codex, Grok Build, Cursor, or OpenCode. Add Obey
- when you want daemon-managed execution; its [provider setup guide](https://docs.fest.build/obey/getting-started/)
- covers the providers it can launch and supervise.
- The `festival` command installs and updates the tools. The base suite includes
- `camp`, `fest`, and the `festival` manager. Install Obey separately with
- `festival install obey`, which adds both `obey` and `ob`.
- ## What would you hand off?
- Start with a real outcome that you can review. For example:
- - **A feature across repositories:** “Add account deletion to the API and web app. Cover it with tests and document how existing users are affected.”
- - **An investigation before a build:** “Investigate why this service slows down under load. Save the evidence, compare the options, and bring me a recommendation before changing production.”
- - **A recurring review:** “Review this week's dependency changes, flag compatibility risks, and prepare the updates for my approval.”
- The goal, constraints, and success criteria come from you. Your agent works through the plan and returns when it reaches a review point or a decision that needs you.
- [Explore the use cases](https://docs.fest.build/use-cases/) · [See example camps and festivals](https://github.com/Obedience-Corp/examples)
- ## Get started
- **Try it on one real goal.** Start with one repository and one goal you already want to finish. Use your existing coding agent to plan the work, execute it, and leave the results ready for review.
- ### 1. Set up with your agent
- Replace the brackets and paste this into your coding agent. It will install Festival if needed, create one camp, and link your existing repository. Git is required.
- ```text
- Help me set up Festival for this goal: [what you want done and how you'll know it worked].
- My existing repository is at: [full local path].
- If `camp`, `fest`, or `festival` is missing, install Festival. On macOS with Homebrew, use `brew install --cask Obedience-Corp/tap/festival`. On macOS or Linux with Node.js, use `npm install -g @obedience-corp/festival`. On Windows x64, install Scoop, then run `scoop install git`, `scoop bucket add obedience https://github.com/Obedience-Corp/scoop-bucket`, and `scoop install obedience/festival` in PowerShell. After installing, run `festival doctor` to check the install.
- Use the installer that owns the suite for updates. For Scoop, run `scoop update festival`. For a Festival-managed install, run `festival update` without `--force`.
- Ask me for a camp name, a one-line description, and a mission. Create the camp with `camp create <name> -d "<description>" -m "<mission>"`. Read `camp create --help` before adding flags. Use `camp create` for this. Do not run `camp init` or `festival setup`. Use the camp path printed by the command (by default, `~/campaigns/<name>`).
- Set up navigation for my shell, adding the following lines to its config only if they are missing. For zsh or bash, use `eval "$(camp shell-init <shell>)"` and `eval "$(fest shell-init <shell>)"`, replacing `<shell>` with `zsh` or `bash`. For fish, use `camp shell-init fish | source` and `fest shell-init fish | source`. For PowerShell 5.1 or 7, add `Invoke-Expression (& camp shell-init powershell | Out-String)` and `Invoke-Expression (& fest shell-init powershell | Out-String)` to `$PROFILE`. Tell me to open a new terminal and run `csw <name>`; you can keep working from the camp root.
- From the camp root, run `camp project link <full-local-repo-path> --yes`. This leaves the repository in place, links it under `projects/`, and adds a `.camp` attachment file to it.
- Read the camp and project instructions, then use `fest understand` to learn the workflow. Skills are optional. Create a festival for my goal, link it to the project with `fest link` from the festival directory, and run the `fest next` loop. Ask me when you need a decision. Show me the festival path so I can follow progress, and leave the results and verification evidence ready for review.
- ```
- The [agent setup guides](https://docs.fest.build/getting-started/agents/) cover optional skills and integrations for your tool.
- <details>
- <summary>Prefer to set up manually?</summary>
- Start with the [Festival CLI installation](#install-festival), then create your workspace.
- Windows supports local Camp and Fest work. `camp sync --from`,
- `camp clone --from`, and artifact transfer to or from another camp are not
- available in this release.
- Create your first camp in the terminal.
- ```bash
- camp create my-camp
- ```
- `camp create` asks for a description and mission. By default, it creates your camp at `~/campaigns/my-camp`. Enter the path printed by the command and link a repository you already use:
- ```bash
- cd ~/campaigns/my-camp
- camp project link /path/to/your-existing-repo
- ```
- Replace the repository path with its full local path. Your repository stays where it is. Camp links it under `projects/` and adds a `.camp` attachment file to the repository. You can also [clone a project into the camp](https://docs.fest.build/cli-reference/camp/camp_project_add/).
- Add the shell integration described below, then open your coding agent at the camp root and give it a goal.
- [Linux packages, the checksummed Windows ZIP, and other install methods](https://docs.fest.build/getting-started/installation/).
- </details>
- **Enable the shell integration.** The shell shortcuts (`csw`, `cgo`, `fgo`, `fls`, and `cr`) are shell functions, so they exist only in a shell that has loaded the integration. The setup prompt asks your agent to add it, but an agent cannot load it into a terminal you already have open. Check your shell config and add these lines if they are missing.
- For zsh, add to `~/.zshrc` (for bash, replace `zsh` with `bash` and use `~/.bashrc`):
- ```bash
- eval "$(camp shell-init zsh)"
- eval "$(fest shell-init zsh)"
- ```
- For fish, add to `~/.config/fish/config.fish`:
- ```fish
- camp shell-init fish | source
- fest shell-init fish | source
- ```
- Open a new terminal and run `type csw`. It should report a shell function. If it reports "not found", the lines are not in the config file your shell reads at startup. Homebrew, npm, and Linux package installs also ship a sourceable helper file that adds tab completion; the [shell setup guide](https://docs.fest.build/getting-started/shell-setup/) lists the path for each install method.
- ### 2. Give your agent a goal
- If you used the setup prompt, your agent already has your first goal. For manual setup or your next goal, tell it:
- > I want [what you want done]. Success means [what you will check]. Create a festival for it, link it to the project, and run the `fest next` loop. Show me the festival path and leave the results ready for review.
- <p align="center">
- <img src="docs/images/demos/tui-delegate.gif" alt="Grok Build receives a goal, reads Festival guidance, and creates a design work item and festival plan." width="700">
- </p>
- A real Grok Build session planning a sample app feature. The agent handles the planning commands; you review the proposed work.
- ### 3. Follow progress and review the result
- Your agent handles planning and execution, asking you when it reaches an approval point or needs a decision. You can focus on other work and review the results when they're ready.
- To check progress along the way, open another terminal at the festival path your agent gives you and run `fest watch`.
- When the work is ready, ask your agent to show you:
- - The result against your original goal and success criteria.
- - The changed files and commits in your project.
- - The test and review evidence, including failures, unresolved questions, and decisions that still need you.
- Use the saved festival plan and work records together with your project's Git history to review what happened before accepting the result.
- <p align="center">
- <img src="docs/images/demos/tui-fest-watch.gif" alt="The fest watch terminal view updates a festival tree as scripted sample tasks advance." width="700">
- </p>
- The progress view you can open alongside your agent. This recording demonstrates the real `fest watch` interface with scripted progress updates in a sample festival.
- **If the session ends:** point your next agent at the saved festival and ask it to continue from the linked project. The recorded plan, progress, and decisions give it a starting point.
- [Follow the video quick start](https://docs.fest.build/getting-started/quickstart/) to see setup, planning with Grok Build, and the progress view.
- ## Share a festival replay
- `fest gif` turns recorded festival progress into a GIF you can send and share:
- ```bash
- fest gif my-festival -o replay.gif
- fest gif --festival MF0001 --speed 2
- ```
- When a festival moves to completed, Fest creates `festival-replay.gif` and embeds
- it in `FESTIVAL_OVERVIEW.md`, with both files included in the completion commit.
- Use `fest gif --embed` to refresh it or add a replay to an older festival.
- See the [replay guide](https://docs.fest.build/guides/festival-replays/) for
- examples, sharing, and recovery.
- ## How the work stays coherent
- A festival is a **graph of work**, organized into phases, sequences, and tasks. Each task has context and completion criteria. Your agent uses `fest next` to find the next actionable step, does the work, checks the result, and records progress before continuing.
- That is the basis for **loop engineering** with Festival: repeatable planning, execution, review, and handoff loops. You can start with a lightweight `WORKFLOW.md`, build a full festival for a larger goal, or run separate festivals with agents in separate worktrees.
- The camp holds the context around those goals over the life of the work. Research can inform a design; that design can become a festival; its results and decisions remain available for the next goal.
- You can work on many projects at once. Over time, camps function more like custom agents, where small seeds of your intentions trigger hundreds or thousands of individual actions.
- Each camp has its own context and workflows, so switching camps changes how your agents work.
- Quality gates provide places to test and review. `fest validate` checks plan structure, and `fest commit` links commits to festival tasks. You review the actual output and verification evidence before accepting the result.
- [Loops & orchestration](https://docs.fest.build/guides/loops-and-orchestration/) · [Festival methodology](https://docs.fest.build/methodology/overview/) · [Work items](https://docs.fest.build/methodology/work-items/)
- ### Add background orchestration with Obey
- After installing the Festival suite, add Obey:
- ```bash
- festival install obey
- obey ping
- ob providers
- ```
- Follow the [Obey setup guide](https://docs.fest.build/obey/getting-started/) to
- check its service and configure a provider and model. From a planned festival,
- preview the execution context before starting the task loop:
- ```bash
- ob fest execute --dry-run
- ob fest execute
- ```
- Obey oversees the session while the agent works through the festival. Use
- `obey top` from the camp to follow sessions. For individual developer tasks,
- `ob` can plan from a spec, review a diff, or generate a commit message.
- Obey's binaries are publicly available even though its source repository is
- private. [Configuration](https://docs.fest.build/obey/configuration/) ·
- [Everyday use](https://docs.fest.build/obey/usage/) ·
- [Troubleshooting](https://docs.fest.build/obey/troubleshooting/)
- The `festival` manager also installs CLI plugins. Run `festival browse` to
- explore them, or read [suite and plugin management](https://docs.fest.build/getting-started/festival-manager/).
- ## Useful between the big goals, too
- - **Jump straight to the work.** `cgo p api` finds a matching project; `cgo f` takes you to festivals. Add the [shell integration](https://docs.fest.build/getting-started/shell-setup/) to enable these shortcuts.
- - **Switch camps.** `camp switch` moves between registered camps. `csw` is the shorthand.
- - **Find the next thing to pick up.** `camp workitem` brings intents, research, designs, and festivals into one work queue.
- - **Start fresh after a merged PR.** `camp fresh` syncs a project to its default branch and prunes merged branches. Preview with `camp fresh --dry-run` from that project first, including any configured branch creation or follow-up commands.
- [Everyday development with cgo and camp fresh](https://docs.fest.build/guides/everyday-development/)
- ## Explore the tools
- The GIFs play on this page at a readable size.
- <details>
- <summary>Create specialized camps and switch between them</summary>
- Once you have a camp for your first goal, you can add others for your job, side projects, or hobbies. Give each its own skills, workflows, and processes so your agents work the way you want in that context.
- ```bash
- camp create work
- csw work
- csw my-camp
- ```
- `csw` is the shorthand for `camp switch`. It requires the [shell integration](https://docs.fest.build/getting-started/shell-setup/). With no name, it opens the camp picker.
- <p align="center">
- <img src="docs/images/demos/tui-camp-create.gif" alt="One session creates two camps, answering the description and mission prompts, then csw switches the shell from my-camp to work." width="700">
- </p>
- This recording shows both camps being created in a fresh demo home, then switching between them. By default, the camps are at `~/campaigns/my-camp` and `~/campaigns/work`.
- </details>
- <details open>
- <summary>Move between projects, plans, and camps</summary>
- `cgo` jumps to a project or planning directory. `camp switch` moves between camps, and `csw` is the shorthand.
- <p align="center">
- <img src="docs/images/demos/cgo-navigation.gif" alt="cgo jumps between projects, festivals, and design directories, then csw, the shorthand for camp switch, changes camps." width="700">
- </p>
- </details>
- <details open>
- <summary>See your camps and the projects inside one</summary>
- `camp list` browses registered camps by org. Move through them, change a camp's status, and filter down to the active ones.
- <p align="center">
- <img src="docs/images/demos/tui-camp-list.gif" alt="camp list groups camps by org, marks one inactive, then filters to active camps." width="700">
- </p>
- `camp project list` browses the projects in the current camp, grouped by type.
- <p align="center">
- <img src="docs/images/demos/tui-project-list.gif" alt="camp project list shows projects grouped by type, with search and a jump into the selected project." width="700">
- </p>
- </details>
- <details open>
- <summary>Find work, capture an idea, and sort the inbox</summary>
- **Find work across the camp.** `camp workitem` brings intents, research, designs, and festivals into one searchable list.
- <p align="center">
- <img src="docs/images/demos/tui-workitems.gif" alt="The camp workitem dashboard shows work across the camp, with search and a preview pane." width="700">
- </p>
- **Capture an idea.** `camp intent add` saves it to the inbox for later.
- <p align="center">
- <img src="docs/images/demos/tui-intent-add.gif" alt="The camp intent add form captures an idea and saves it to the inbox." width="700">
- </p>
- **Sort the inbox.** `camp intent explore` lets you browse intents by status and read their details.
- <p align="center">
- <img src="docs/images/demos/tui-intent-explore.gif" alt="The camp intent explore interface groups intents by status with fuzzy search and a live preview." width="700">
- </p>
- </details>
- <details open>
- <summary>See which festivals are active and inspect a plan</summary>
- `fest list` groups festivals by status, so you can see what's active, ready, or still being planned.
- <p align="center">
- <img src="docs/images/demos/tui-fest-list.gif" alt="fest list groups festivals into active, ready, and planning states." width="700">
- </p>
- `fest show` opens the structure of a plan, from its phases down to individual tasks.
- <p align="center">
- <img src="docs/images/demos/tui-fest-show.gif" alt="fest show displays a festival's phase, sequence, and task tree and switches between plans." width="700">
- </p>
- </details>
- <details open>
- <summary>Start fresh after a merged change</summary>
- `camp fresh configure` sets the follow-up commands that run after a project syncs.
- <p align="center">
- <img src="docs/images/demos/tui-fresh-configure.gif" alt="camp fresh configure adds a follow-up command for one project, including what happens if that command fails." width="700">
- </p>
- `camp fresh` checks out the default branch, pulls, prunes merged branches, and runs those follow-ups.
- <p align="center">
- <img src="docs/images/demos/tui-fresh.gif" alt="camp fresh syncs main, deletes merged branches, runs a follow-up, and reports a work item it left in place." width="700">
- </p>
- </details>
- <details open>
- <summary>Add testing and review gates to a plan</summary>
- `fest gates apply` previews the quality gates it will add before applying them with approval.
- <p align="center">
- <img src="docs/images/demos/tui-fest-gates-apply.gif" alt="fest gates apply previews quality gates for the plan's sequences, then applies them with approval." width="700">
- </p>
- </details>
- <details open>
- <summary>Review old work and clear space for what's next</summary>
- `camp dungeon crawl` walks through stale work so you can choose what to keep or archive.
- <p align="center">
- <img src="docs/images/demos/tui-dungeon-crawl.gif" alt="camp dungeon crawl offers keep, archive, and skip choices for stale work, then records the result." width="700">
- </p>
- </details>
- <details open>
- <summary>Reach a camp on another machine</summary>
- `camp machine` lists computers camp can hop to, and can add one from your Tailscale network.
- <p align="center">
- <img src="docs/images/demos/tui-machine.gif" alt="camp machine explains hops, then picks a computer from the Tailscale network to add." width="700">
- </p>
- </details>
- <details open>
- <summary>Open the Festival installer</summary>
- `festival` opens the suite manager: install the tools, check the setup, and launch camp and fest.
- <p align="center">
- <img src="docs/images/demos/tui-festival.gif" alt="The festival installer home, with setup steps and menus for install, doctor, and the camp and fest launchpad." width="700">
- </p>
- </details>
- <details>
- <summary>Watch a longer Festival session <strong>(click to expand video preview)</strong></summary>
- An earlier Festival workflow recording at 16× playback speed. Use the setup instructions above for the current first-run path.
- <p align="center">
- <a href="https://youtu.be/FY6vm74oa8o"><img src="docs/images/demo_video_thumb.jpg" alt="Watch a longer Festival workflow session on YouTube." width="700"></a>
- </p>
- </details>
- [More video walkthroughs and demos](https://docs.fest.build/videos/)
- ## Fits the tools you already use
- **Can I keep my issue tracker?**
- Yes. Keep issues where your team coordinates, and use Festival for the agent's plan and work record. Intents and other work items live in files, so scripts or justfiles can connect them to an external service's API. Ask your agent to help build the connection you need. [See the workflow](https://docs.fest.build/compare/festival-vs-issue-trackers/).
- **Can I change agents partway through?**
- Yes. The next agent can read the same saved plan, decisions, and progress. Give it the festival location and access to the linked project. [Agent handoff guide](https://docs.fest.build/use-cases/ai-agent-handoff/).
- **Do I need a Festival account?**
- The CLI tools are free to use and run locally without a Festival account. Your agent's account, model costs, and permissions remain with the provider you choose.
- ## Keep going
- - [Join the Obedience Corp Discord](https://discord.gg/Rt7dDY6VqD): get help with Festival, compare workflows, and share what you build.
- - [Documentation](https://docs.fest.build/): guides, use cases, and CLI reference.
- - [First festival tutorial](https://docs.fest.build/tutorials/first-festival/): a hands-on walkthrough of the plan structure.
- - [Examples](examples/) and [templates](templates/): work you can inspect and adapt.
- - [Plugin authoring](https://docs.fest.build/guides/plugin-authoring/): extend `camp` and `fest` with your own commands.
- - [Report a bug or request a feature](https://github.com/Obedience-Corp/festival/issues): tell us what happened or what would help.
- - [Give feedback](https://fest.build/feedback/) or [read the blog](https://fest.build/blog/).
- If Festival is useful to you, **star this repository** to help other developers discover it. A bug report, a workflow you share, or an example of work you've handed off helps us improve it.
- ## Licensing
- The Festival CLI suite (`festival`, `fest`, and `camp`) is open source under the
- [Apache License 2.0](LICENSE).
- Obey (the `obey` daemon and the `ob` client) and Festival App are optional
- proprietary products from Obedience Corp. Their release terms apply whether you
- install them through the Festival CLI or download them directly. See the
- [binary distribution license](https://github.com/Obedience-Corp/obey-releases/blob/main/LICENSE)
- and the terms included with each release.
- Built by [Obedience Corp](https://obediencecorp.com/).
claude-plugin/hooks/scripts/ensure-festival.sh · Bundled script · 350 lines · 6 findings marked
- #!/usr/bin/env bash
- # Ensures fest and camp are installed and up-to-date. Runs on SessionStart.
- # - If missing: downloads and installs from GitHub releases with checksum verification.
- # - If installed: checks for newer version and offers update notification.
- set -euo pipefail
- INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
- REPO="Obedience-Corp/festival"
- CACHE_DIR="${FESTIVAL_CACHE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/festival}"
- CHECK_FILE="${FESTIVAL_CHECK_FILE:-$CACHE_DIR/last-update-check}"
- DOWNLOAD_TIMEOUT_SECONDS="${FESTIVAL_DOWNLOAD_TIMEOUT_SECONDS:-120}"
- info() {
- echo "$*" >&2
- }
- fail() {
- echo "$*" >&2
- exit 1
- }
- require_command() {
- local name="$1"
- command -v "$name" >/dev/null 2>&1 || fail "Required command not found: $name"
- }
- require_checksum_command() {
- if command -v shasum >/dev/null 2>&1 || command -v sha256sum >/dev/null 2>&1; then
- return 0
- fi
- fail "Required command not found: shasum or sha256sum"
- }
- check_installed() {
- command -v fest >/dev/null 2>&1 && command -v camp >/dev/null 2>&1
- }
- # Rate-limit update checks to once per day
- should_check_update() {
- if [ ! -f "$CHECK_FILE" ]; then
- return 0
- fi
- local last_check
- last_check=$(cat "$CHECK_FILE" 2>/dev/null || echo 0)
- local now
- now=$(date +%s)
- local age=$(( now - last_check ))
- # 86400 = 24 hours
- [ "$age" -ge 86400 ]
- }
- record_check() {
- mkdir -p "$(dirname "$CHECK_FILE")"
- date +%s > "$CHECK_FILE"
- }
- detect_platform() {
- OS=$(uname -s | tr '[:upper:]' '[:lower:]')
- case "$OS" in
- darwin) OS="macOS" ;;
- linux) OS="linux" ;;
- *) echo "Unsupported OS: $OS" >&2; exit 1 ;;
- esac
- ARCH=$(uname -m)
- case "$ARCH" in
- x86_64|amd64) ARCH="x86_64" ;;
- arm64|aarch64) ARCH="arm64" ;;
- *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;;
- esac
- }
- fetch_release() {
- curl -fsSL --connect-timeout 10 --max-time "$DOWNLOAD_TIMEOUT_SECONDS" "https://api.github.com/repos/${REPO}/releases/latest" 2>/dev/null
- }
- find_archive_url() {
- local release_json="$1"
- local url
- # Try exact OS-ARCH match first, then OS-all (universal binary, e.g. macOS-all)
- url=$(echo "$release_json" | grep '"browser_download_url"' | grep -i "${OS}" | grep -i "${ARCH}" | grep '\.tar\.gz"' | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
- if [ -z "$url" ]; then
- url=$(echo "$release_json" | grep '"browser_download_url"' | grep -i "${OS}" | grep -i "all" | grep '\.tar\.gz"' | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
- fi
- echo "$url"
- }
- extract_tag() {
- echo "$1" | grep '"tag_name"' | head -1 | sed -E 's/.*"([^"]+)".*/\1/'
- }
- download_file() {
- local url="$1"
- local dest="$2"
- local tmp="${dest}.tmp"
- rm -f "$tmp"
- curl -fsSL --connect-timeout 10 --max-time "$DOWNLOAD_TIMEOUT_SECONDS" "$url" -o "$tmp" || {
- rm -f "$tmp"
- return 1
- }
- mv "$tmp" "$dest"
- }
- checksum_url_for_archive() {
- local archive_url="$1"
- echo "${archive_url%/*}/checksums.txt"
- }
- sha256_file() {
- local file="$1"
- if command -v shasum >/dev/null 2>&1; then
- shasum -a 256 "$file" | awk '{print $1}'
- return 0
- fi
- sha256sum "$file" | awk '{print $1}'
- }
- expected_checksum() {
- local checksums_file="$1"
- local archive_name="$2"
- awk -v name="$archive_name" '$2 == name {print $1; found=1} END {exit found ? 0 : 1}' "$checksums_file"
- }
- verify_checksum() {
- local archive_path="$1"
- local checksums_path="$2"
- local archive_name="$3"
- local expected actual
- expected="$(expected_checksum "$checksums_path" "$archive_name")" || {
- echo "Checksum for ${archive_name} not found in checksums.txt" >&2
- return 1
- }
- actual="$(sha256_file "$archive_path")"
- if [ "$actual" != "$expected" ]; then
- echo "Checksum mismatch for ${archive_name}" >&2
- echo "expected: ${expected}" >&2
- echo "actual: ${actual}" >&2
- return 1
- fi
- }
- download_and_install() {
- local archive_url="$1"
- local archive_name checksums_url archive_path checksums_path
- archive_name="$(basename "$archive_url")"
- checksums_url="$(checksum_url_for_archive "$archive_url")"
- TMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/festival-plugin.XXXXXX")
- trap 'rm -rf "$TMP_DIR"' EXIT
- archive_path="${TMP_DIR}/${archive_name}"
- checksums_path="${TMP_DIR}/checksums.txt"
- download_file "$archive_url" "$archive_path" ||
- fail "Download failed. Install manually: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 165 on GitHub
- download_file "$checksums_url" "$checksums_path" ||
- fail "Checksum download failed. Install manually: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 168 on GitHub
- verify_checksum "$archive_path" "$checksums_path" "$archive_name" ||
- fail "Checksum verification failed. Install manually: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 171 on GitHub
- tar -xzf "$archive_path" -C "$TMP_DIR"
- mkdir -p "$INSTALL_DIR"
- for binary in fest camp; do
- extracted_path="$(find "$TMP_DIR" -type f -name "$binary" | head -1)"
- if [ -n "$extracted_path" ]; then
- install -m 0755 "$extracted_path" "${INSTALL_DIR}/${binary}"
- else
- fail "${binary} not found in ${archive_name}"
- fi
- done
- }
- # parse_local_fest_version SHORT_OUTPUT FULL_OUTPUT
- #
- # Prefer `fest version --short` (a single token: "dev", "v0.2.16", ...). If that
- # is empty (old binary, flag unknown), take field 2 of the first `fest version`
- # line ("fest v0.2.16" / "fest dev"). Do not scan the whole block for X.Y.Z:
- # the Go runtime line is `go: go1.26.4` and a greedy grep treats 1.26.4 as the
- # installed festival version.
- parse_local_fest_version() {
- local short="${1-}"
- local full="${2-}"
- local short_version
- short_version="$(printf '%s\n' "$short" | awk 'NR==1 {print $1; exit}')"
- if [ -n "$short_version" ]; then
- printf '%s' "$short_version"
- return 0
- fi
- printf '%s\n' "$full" | awk 'NR==1 {print $2; exit}'
- }
- # is_release_version TOKEN: 0 when TOKEN is a festival release semver
- # (optional leading v, X.Y.Z, optional -rc.N / dotted suffix). Rejects "dev",
- # empty, and *-dev.* snapshot builds.
- is_release_version() {
- local v="${1-}"
- case "$v" in
- ""|dev|unknown) return 1 ;;
- *-dev|*-dev.*) return 1 ;;
- esac
- printf '%s' "$v" | grep -Eq '^v?[0-9]+\.[0-9]+\.[0-9]+([.-][A-Za-z0-9.]+)?$'
- }
- # parse_bundle_version FULL_OUTPUT
- #
- # The festival suite version from `fest version`'s `bundle:` line, empty when
- # there is none. The line reads "bundle: festival vX.Y.Z", so the version is the
- # last field rather than field 2, and it is read through the semver grep so a
- # CRLF line ending or stray whitespace cannot ride along into the comparison.
- parse_bundle_version() {
- printf '%s\n' "${1-}" | grep '^bundle:' |
- grep -oE 'v?[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true
- }
- # has_build_profile FULL_OUTPUT: 0 when `fest version` printed a `profile:`
- # line, which every bundle-capable fest does, bundled or not.
- has_build_profile() {
- printf '%s\n' "${1-}" | grep -q '^profile:'
- }
- # read_local_fest_version FULL_OUTPUT: fest's own release token, from an
- # already-captured `fest version` block plus a fresh `fest version --short`.
- read_local_fest_version() {
- local full="${1-}"
- local short
- short="$(fest version --short 2>/dev/null || true)"
- parse_local_fest_version "$short" "$full"
- }
- # print_update_notice CURRENT LATEST
- #
- # Prefer `festival update` when the hub binary is on PATH: it knows how the suite
- # was installed and runs or prints the package manager's command for Homebrew,
- # npm, AUR, and Scoop installs. install.sh would drop a second copy into
- # ~/.local/bin next to the package-manager copy.
- print_update_notice() {
- local current="$1" latest="$2"
- if command -v festival >/dev/null 2>&1; then
- info "Festival update available: ${current} -> ${latest}. Run: festival update"
- else
- info "Festival update available: ${current} -> ${latest}. Run: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 254 on GitHub
- fi
- }
- main() {
- require_command curl
- require_command tar
- require_command grep
- require_command sed
- require_command awk
- require_command find
- require_command install
- require_checksum_command
- detect_platform
- if ! check_installed; then
- info "Festival CLI not found. Installing fest and camp..."
- RELEASE_JSON=$(fetch_release) || {
- info "Could not fetch release info. Install manually: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 273 on GitHub
- exit 1
- }
- ARCHIVE_URL=$(find_archive_url "$RELEASE_JSON")
- if [ -z "$ARCHIVE_URL" ]; then
- info "No compatible archive found for ${OS}/${ARCH}. Install manually: curl -fsSL https://raw.githubusercontent.com/${REPO}/main/install.sh | bash"
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 279 on GitHub
- exit 1
- fi
- download_and_install "$ARCHIVE_URL"
- record_check
- if command -v fest >/dev/null 2>&1; then
- info "Festival installed successfully: $(fest version 2>/dev/null || echo 'fest ready')"
- else
- info "Installed to ${INSTALL_DIR}. You may need to add it to your PATH: export PATH=\"${INSTALL_DIR}:\$PATH\""
- fi
- exit 0
- fi
- # Already installed: check for updates (rate-limited to once/day)
- if ! should_check_update; then
- exit 0
- fi
- # This compares against the latest festival suite tag, so it needs the suite
- # version, not fest's own release. `fest version` distinguishes three cases:
- #
- # bundle: line a suite build; that line carries the version to compare
- # profile: line a bundle-capable fest that was not built from a suite
- # release (go install, just build)
- # neither a bundle published before either line existed, which
- # stamped the suite version into fest's own version field
- FEST_VERSION_OUTPUT="$(fest version 2>/dev/null)" || FEST_VERSION_OUTPUT=""
- CURRENT_VERSION="$(parse_bundle_version "$FEST_VERSION_OUTPUT")"
- if [ -z "$CURRENT_VERSION" ] && has_build_profile "$FEST_VERSION_OUTPUT"; then
- # A bundle-capable fest with no bundle line was never part of a suite
- # release, so there is no suite version to compare the tag against.
- # Saying anything here nags forever about an update the user did not
- # install and cannot apply, so record the check and stay quiet.
- record_check
- exit 0
- fi
- if [ -z "$CURRENT_VERSION" ]; then
- CURRENT_VERSION="$(read_local_fest_version "$FEST_VERSION_OUTPUT")"
- fi
- if ! is_release_version "$CURRENT_VERSION"; then
- if [ -n "$CURRENT_VERSION" ]; then
- info "Festival update check skipped: local fest version '${CURRENT_VERSION}' is not a release"
- fi
- record_check
- exit 0
- fi
- RELEASE_JSON=$(fetch_release 2>/dev/null) || {
- record_check
- exit 0
- }
- LATEST_TAG=$(extract_tag "$RELEASE_JSON")
- CURRENT_CLEAN="${CURRENT_VERSION#v}"
- LATEST_CLEAN="${LATEST_TAG#v}"
- record_check
- if [ "$CURRENT_CLEAN" != "$LATEST_CLEAN" ]; then
- print_update_notice "$CURRENT_VERSION" "$LATEST_TAG"
- fi
- }
- # Run main only when executed, not when sourced by the test harness.
- if [ "${BASH_SOURCE[0]:-$0}" = "$0" ]; then
- main "$@"
- fi
claude-plugin/hooks/scripts/ensure-festival.test.sh · Bundled script · 212 lines · 1 finding marked
- #!/usr/bin/env bash
- # Unit tests for ensure-festival.sh version parsing and the update notice.
- #
- # Sources the installer (its main() is guarded so sourcing only defines
- # functions) and exercises parse_local_fest_version / is_release_version
- # against the SessionStart nag that treated `go: go1.26.4` as the installed
- # festival version, plus parse_bundle_version / has_build_profile, which decide
- # which of `fest version`'s three shapes carries a suite version to compare.
- # Pure string logic: no network, no temp dirs. Invoked by `just plugin check`.
- set -u
- DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
- # shellcheck source=./ensure-festival.sh
- source "$DIR/ensure-festival.sh"
- fail=0
- check_parse() { # $1 want $2 short $3 full
- local want="$1" short="$2" full="$3" got
- got="$(parse_local_fest_version "$short" "$full")"
- if [ "$got" = "$want" ]; then
- if [ -n "${ENSURE_FESTIVAL_TEST_VERBOSE:-}" ]; then
- printf 'ok parse %-12s\n' "$want"
- fi
- else
- printf 'FAIL parse want=%s got=%s\n' "$want" "$got"
- fail=1
- fi
- }
- check_release() { # $1 want(yes|no) $2 token
- local want="$1" token="$2" got
- if is_release_version "$token"; then got=yes; else got=no; fi
- if [ "$got" = "$want" ]; then
- if [ -n "${ENSURE_FESTIVAL_TEST_VERBOSE:-}" ]; then
- printf 'ok release %-4s %s\n' "$want" "$token"
- fi
- else
- printf 'FAIL release want=%s got=%s %s\n' "$want" "$got" "$token"
- fail=1
- fi
- }
- check_bundle() { # $1 want $2 full
- local want="$1" full="$2" got
- got="$(parse_bundle_version "$full")"
- if [ "$got" = "$want" ]; then
- if [ -n "${ENSURE_FESTIVAL_TEST_VERBOSE:-}" ]; then
- printf 'ok bundle %-10s\n' "${want:-<none>}"
- fi
- else
- printf 'FAIL bundle want=%s got=%s\n' "$want" "$got"
- fail=1
- fi
- }
- check_profile() { # $1 want(yes|no) $2 full
- local want="$1" full="$2" got
- if has_build_profile "$full"; then got=yes; else got=no; fi
- if [ "$got" = "$want" ]; then
- if [ -n "${ENSURE_FESTIVAL_TEST_VERBOSE:-}" ]; then
- printf 'ok profile %-4s\n' "$want"
- fi
- else
- printf 'FAIL profile want=%s got=%s\n' "$want" "$got"
- fail=1
- fi
- }
- classic_full=$'fest dev\ncommit: 00bc23e\nbuilt: 2026-08-17T23:38:19Z\ngo: go1.26.4\nplatform: darwin/arm64'
- buggy="$(printf '%s\n' "$classic_full" | grep -oE 'v?[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)"
- if [ "$buggy" = "1.26.4" ]; then
- if [ -n "${ENSURE_FESTIVAL_TEST_VERBOSE:-}" ]; then
- printf 'ok fixture still reproduces the greedy grep\n'
- fi
- else
- printf 'FAIL fixture no longer reproduces the grep bug (got %s)\n' "$buggy"
- fail=1
- fi
- # --short is the version token; full output's Go line must not win.
- check_parse "dev" "dev" "$classic_full"
- check_parse "v0.2.16" "v0.2.16" $'fest v0.2.16\ngo: go1.26.4'
- check_parse "v9.8.7" "v9.8.7" $'fest v9.8.7\ngo: go1.26.4'
- # Fallback when --short is empty: field 2 of the first line, not a blob grep.
- check_parse "dev" "" "$classic_full"
- check_parse "v0.2.16" "" $'fest v0.2.16\ncommit: abc\ngo: go1.26.4'
- check_parse "" "" ""
- # Accidental full-block in the short slot: first field is "fest", never 1.26.4.
- check_parse "fest" "$classic_full" "$classic_full"
- check_release yes "v0.2.16"
- check_release yes "0.2.16"
- check_release yes "v9.8.7"
- check_release yes "v0.2.16-rc.1"
- check_release no "dev"
- check_release no ""
- check_release no "unknown"
- check_release no "fest"
- check_release no "go1.26.4"
- check_release no "v0.2.16-dev.3"
- check_release no "0.2.16-dev"
- # The three shapes of `fest version` the update check has to tell apart. The
- # suite build carries a bundle: line; a go install / just build carries only
- # profile:; a bundle published before either line existed carries neither.
- suite_full=$'fest v0.6.3\nbundle: festival v0.2.18\ncommit: 1a2b3c4\nbuilt: 2026-08-21T00:00:00Z\ngo: go1.26.4\nplatform: darwin/arm64\nprofile: stable'
- profile_only_full=$'fest v0.6.3\ncommit: 1a2b3c4\nbuilt: 2026-08-21T00:00:00Z\ngo: go1.26.4\nplatform: darwin/arm64\nprofile: stable'
- legacy_full=$'fest v0.2.17\ncommit: 98b9950e\nbuilt: 2026-08-10T00:00:00Z\ngo: go1.26.4\nplatform: darwin/arm64'
- suite_crlf="$(printf '%s\n' "$suite_full" | awk '{ printf "%s\r\n", $0 }')"
- # The bundle line is the suite version; fest's own v0.6.3 is not, and neither is
- # the Go line. A CRLF ending must not ride along into the comparison.
- check_bundle "v0.2.18" "$suite_full"
- check_bundle "v0.2.18" "$suite_crlf"
- # No bundle line: nothing to compare, whichever other lines are present.
- check_bundle "" "$profile_only_full"
- check_bundle "" "$legacy_full"
- check_bundle "" "$classic_full"
- check_bundle "" ""
- # profile: marks a bundle-capable fest, which is what separates "built outside a
- # suite release, stay quiet" from "old bundle, fest's own version is the suite
- # version".
- check_profile yes "$suite_full"
- check_profile yes "$profile_only_full"
- check_profile no "$legacy_full"
- check_profile no "$classic_full"
- check_profile no ""
- # The legacy shape still falls through to the existing parser, which reads the
- # suite version out of fest's own version field.
- check_parse "v0.2.17" "" "$legacy_full"
- check_parse "v0.2.17" "v0.2.17" "$legacy_full"
- check_release yes "$(parse_local_fest_version "" "$legacy_full")"
- # Whatever the shape, no read may ever return the Go toolchain version.
- for shape in "$suite_full" "$profile_only_full" "$legacy_full" "$classic_full"; do
- for got in "$(parse_bundle_version "$shape")" "$(parse_local_fest_version "" "$shape")"; do
- case "$got" in
- *1.26.4*)
- printf 'FAIL go toolchain version leaked into a version read: %s\n' "$got"
- fail=1
- ;;
- esac
- done
- done
- # Update notice: run main() end to end with a stub fest, a stubbed release
- # fetch, and an isolated HOME/cache so nothing touches the network or the real
- # home. PATH holds only the stub dir plus the system dirs, so `festival` is
- # present or absent on purpose.
- notice_tmp="$(mktemp -d "${TMPDIR:-/tmp}/ensure-festival-test.XXXXXX")"
- trap 'rm -rf "$notice_tmp"' EXIT
- mkdir -p "$notice_tmp/bin" "$notice_tmp/home"
- cat > "$notice_tmp/bin/fest" <<'EOF_FEST'
- #!/bin/sh
- case "$*" in
- "version --short") echo v0.3.20 ;;
- *) printf 'fest v0.3.20\nprofile: suite\nbundle: festival v0.3.20\n' ;;
- esac
- EOF_FEST
- printf '#!/bin/sh\nexit 0\n' > "$notice_tmp/bin/camp"
- printf '#!/bin/sh\nexit 0\n' > "$notice_tmp/bin/festival"
- chmod +x "$notice_tmp/bin/fest" "$notice_tmp/bin/camp" "$notice_tmp/bin/festival"
- run_notice() { # $1 with_festival(yes|no) $2 latest tag
- local with_festival="$1" latest="$2" festival_bin="$notice_tmp/bin/festival" hidden="$notice_tmp/bin/festival.off"
- rm -rf "$notice_tmp/cache"
- if [ "$with_festival" = no ] && [ -e "$festival_bin" ]; then mv "$festival_bin" "$hidden"; fi
- if [ "$with_festival" = yes ] && [ -e "$hidden" ]; then mv "$hidden" "$festival_bin"; fi
- (
- export HOME="$notice_tmp/home" FESTIVAL_CACHE_DIR="$notice_tmp/cache"
- export PATH="$notice_tmp/bin:/usr/bin:/bin"
- unset FESTIVAL_CHECK_FILE
- # shellcheck disable=SC2034
- CHECK_FILE="$FESTIVAL_CACHE_DIR/last-update-check"
- # shellcheck disable=SC2329
- fetch_release() { printf '{"tag_name": "%s"}\n' "$latest"; }
- main 2>&1
- )
- }
- check_notice() { # $1 name $2 want-substring ("" = no output) $3 forbidden-substring $4 with_festival $5 latest
- local name="$1" want="$2" forbid="$3" got
- got="$(run_notice "$4" "$5")"
- if [ -z "$want" ]; then
- if [ -n "$got" ]; then printf 'FAIL notice %s: want no output, got: %s\n' "$name" "$got"; fail=1; fi
- return
- fi
- case "$got" in
- *"$want"*) ;;
- *) printf 'FAIL notice %s: missing "%s" in: %s\n' "$name" "$want" "$got"; fail=1 ;;
- esac
- case "$got" in
- *"$forbid"*) printf 'FAIL notice %s: unexpected "%s" in: %s\n' "$name" "$forbid" "$got"; fail=1 ;;
- esac
- }
- check_notice "festival on PATH" "Festival update available: v0.3.20 -> v0.3.24. Run: festival update" "install.sh" yes v0.3.24
- check_notice "festival absent" "Run: curl -fsSL https://raw.githubusercontent.com/Obedience-Corp/festival/main/install.sh | bash" "Run: festival update" no v0.3.24
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 203 on GitHub
- check_notice "up to date, festival on PATH" "" "" yes v0.3.20
- check_notice "up to date, festival absent" "" "" no v0.3.20
- if [ "$fail" -ne 0 ]; then
- echo "ensure-festival version parse tests failed" >&2
- exit 1
- fi
- echo "ensure-festival version parse tests passed"
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.