{"id":49865173,"url":"https://github.com/cuttlefisch/declarative-project-mode","last_synced_at":"2026-05-15T01:30:08.699Z","repository":{"id":132538412,"uuid":"588785518","full_name":"cuttlefisch/declarative-project-mode","owner":"cuttlefisch","description":"Manage and install variety of project contents with simple declatative syntax using Emacs minor mode.","archived":false,"fork":false,"pushed_at":"2026-04-14T21:54:36.000Z","size":220,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-14T23:32:58.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuttlefisch.png","metadata":{"files":{"readme":"README.org","changelog":"CHANGELOG.org","contributing":"CONTRIBUTING.org","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2023-01-14T02:02:53.000Z","updated_at":"2026-04-14T21:54:37.000Z","dependencies_parsed_at":"2023-06-08T20:45:46.644Z","dependency_job_id":null,"html_url":"https://github.com/cuttlefisch/declarative-project-mode","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cuttlefisch/declarative-project-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuttlefisch%2Fdeclarative-project-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuttlefisch%2Fdeclarative-project-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuttlefisch%2Fdeclarative-project-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuttlefisch%2Fdeclarative-project-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuttlefisch","download_url":"https://codeload.github.com/cuttlefisch/declarative-project-mode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuttlefisch%2Fdeclarative-project-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33050028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":[],"created_at":"2026-05-15T01:30:07.706Z","updated_at":"2026-05-15T01:30:08.660Z","avatar_url":"https://github.com/cuttlefisch.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: declarative-project-mode\n\n#+HTML: \u003ca href=\"https://github.com/cuttlefisch/declarative-project-mode/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/cuttlefisch/declarative-project-mode/ci.yml?branch=main\u0026style=flat-square\" alt=\"CI\"\u003e\u003c/a\u003e \u003ca href=\"https://www.gnu.org/licenses/gpl-3.0\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-GPL--3.0-blue?style=flat-square\" alt=\"GPL-3.0\"\u003e\u003c/a\u003e \u003ca href=\"https://www.gnu.org/software/emacs/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Emacs-28.1%2B-purple?style=flat-square\" alt=\"Emacs 28.1+\"\u003e\u003c/a\u003e\n\nAn Emacs minor mode for declarative project resource management. Define your\nproject's dependencies, files, symlinks, and workspace assignments in a single\n=.project= file, then install everything with one keybinding.\n\n* Installation\n\n** straight.el / Doom Emacs\n\n#+begin_src emacs-lisp\n;; straight.el\n(straight-use-package\n '(declarative-project-mode\n   :host github\n   :repo \"cuttlefisch/declarative-project-mode\"))\n\n;; Doom Emacs (packages.el)\n(package! declarative-project-mode\n  :recipe (:host github\n           :repo \"cuttlefisch/declarative-project-mode\"))\n#+end_src\n\n** Manual\n\n#+begin_src shell\ngit clone https://github.com/cuttlefisch/declarative-project-mode.git\n#+end_src\n\n#+begin_src emacs-lisp\n(add-to-list 'load-path \"/path/to/declarative-project-mode\")\n(require 'declarative-project-mode)\n#+end_src\n\n* Usage\n\nCreate a =.project= file in your project root. The mode activates automatically\nwhen you visit a =.project= file.\n\nPress =C-c C-c i= to install all declared resources.\n\n** Example =.project= (YAML)\n\n#+begin_src yaml\nproject-name: \"My Project\"\nrequired-resources:\n  - README.org\n  - src/main.el\ndeps:\n  - src: git@github.com:user/repo.git\n    dest: vendor/repo\n  - src: git@github.com:user/other.git\n    args: \"--branch develop\"\nlocal-files:\n  - src: ~/templates/makefile\n    dest: Makefile\nsymlinks:\n  - targ: ~/notes/my-project.org\n    link: docs/notes.org\ntreemacs-workspaces:\n  - \"Emacs Packages\"\n#+end_src\n\n** Auto-install\n\nTo install resources automatically when the mode activates:\n\n#+begin_src emacs-lisp\n(setq declarative-project-auto-install t)\n#+end_src\n\n* Org-Babel Integration\n\nEmbed project specs in org files as =declarative-project= src blocks:\n\n#+begin_example\n#+begin_src declarative-project :dir ~/my-project\nproject-name: \"My Project\"\ndeps:\n  - src: git@github.com:user/repo.git\n    dest: repo\n#+end_src\n#+end_example\n\nExecute with =C-c C-c= on the src block. The =:dir= header argument sets the\nproject root directory (defaults to =default-directory=).\n\nEnable in your config:\n\n#+begin_src emacs-lisp\n(add-to-list 'org-babel-load-languages '(declarative-project . t))\n(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)\n#+end_src\n\n* Treemacs Workspace Integration\n\nThe optional =declarative-project-treemacs-mode= manages treemacs workspaces\nfrom =.project= files. Each project declares which workspaces it belongs to, and\nthe mode ensures those assignments exist.\n\n#+begin_src emacs-lisp\n(require 'declarative-project-treemacs)\n(declarative-project-treemacs-mode 1)\n#+end_src\n\nWhen enabled, project installation creates or updates treemacs workspace\nentries. Set =declarative-project-treemacs-autoprune= to =nil= to disable\nautomatic removal of stale project entries on mode init.\n\n** Framework-specific configuration\n\n*** Doom Emacs\n\nIn =packages.el=:\n#+begin_src emacs-lisp\n(package! declarative-project-mode\n  :recipe (:host github :repo \"cuttlefisch/declarative-project-mode\"))\n#+end_src\n\nIn =config.el=:\n#+begin_src emacs-lisp\n(use-package! declarative-project-mode\n  :config\n  (after! treemacs\n    (require 'declarative-project-treemacs)\n    (setq declarative-project-treemacs-cache-file\n          (expand-file-name \"treemacs-declared-workspaces.el\" doom-cache-dir))\n    (declarative-project-treemacs-mode 1)))\n#+end_src\n\n*** Spacemacs\n\nIn =dotspacemacs-additional-packages=:\n#+begin_src emacs-lisp\n(declarative-project-mode\n :location (recipe :fetcher github :repo \"cuttlefisch/declarative-project-mode\"))\n#+end_src\n\nIn =dotspacemacs/user-config=:\n#+begin_src emacs-lisp\n(require 'declarative-project-treemacs)\n(setq declarative-project-treemacs-cache-file\n      (expand-file-name \"treemacs-declared-workspaces.el\" spacemacs-cache-directory))\n(declarative-project-treemacs-mode 1)\n#+end_src\n\n*** Vanilla Emacs\n\n#+begin_src emacs-lisp\n(require 'declarative-project-treemacs)\n(declarative-project-treemacs-mode 1)\n;; Cache file defaults to user-emacs-directory; customize if needed:\n;; (setq declarative-project-treemacs-cache-file \"~/.cache/emacs/treemacs-declared-workspaces.el\")\n#+end_src\n\n* Spec Reference\n\n| Field                  | Type          | Description                                          |\n|------------------------+---------------+------------------------------------------------------|\n| =project-name=        | string        | Display name for the project                         |\n| =required-resources=  | list(string)  | Paths that must exist; warns on missing              |\n| =deps=                | list(object)  | Git repos to clone (=src=, =dest=, =args=)          |\n| =local-files=         | list(object)  | Files to copy into the project (=src=, =dest=)      |\n| =symlinks=            | list(object)  | Symlinks to create (=targ=, =link=)                 |\n| =treemacs-workspaces= | list(string)  | Treemacs workspaces to assign this project to        |\n\nFor =deps=, =local-files=, and =symlinks=: omitting =dest= or =link= defaults\nto placing the resource in the project root directory.\n\n* Configuration\n\n| Variable                                   | Default | Description                                       |\n|--------------------------------------------+---------+---------------------------------------------------|\n| =declarative-project-auto-install=         | =nil=   | Auto-run installation when mode activates          |\n| =declarative-project-treemacs-autoprune=   | =t=     | Remove stale project entries on treemacs mode init |\n| =declarative-project-treemacs-cache-file=  | =user-emacs-directory= | Path to the workspace cache file |\n\n* Development\n\n#+begin_src shell\ncask install\nmake test    # 96 Buttercup specs\n#+end_src\n\nSee [[file:CONTRIBUTING.org][CONTRIBUTING.org]] for the full development guide.\n\n* License\n\n[[file:LICENSE][GNU General Public License v3.0]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuttlefisch%2Fdeclarative-project-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuttlefisch%2Fdeclarative-project-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuttlefisch%2Fdeclarative-project-mode/lists"}