{"id":13836944,"url":"https://github.com/benoitc/erica","last_synced_at":"2025-05-08T17:21:57.133Z","repository":{"id":63104473,"uuid":"1812441","full_name":"benoitc/erica","owner":"benoitc","description":"tool to manage couchapps","archived":false,"fork":false,"pushed_at":"2017-08-30T19:08:41.000Z","size":6737,"stargazers_count":265,"open_issues_count":36,"forks_count":31,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-31T17:53:43.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benoitc.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}},"created_at":"2011-05-27T23:47:06.000Z","updated_at":"2025-02-01T14:37:45.000Z","dependencies_parsed_at":"2022-11-13T00:00:45.388Z","dependency_job_id":null,"html_url":"https://github.com/benoitc/erica","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Ferica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Ferica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Ferica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitc%2Ferica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benoitc","download_url":"https://codeload.github.com/benoitc/erica/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253112362,"owners_count":21856124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-08-04T15:00:57.803Z","updated_at":"2025-05-08T17:21:57.112Z","avatar_url":"https://github.com/benoitc.png","language":"JavaScript","readme":"# Erica\n\n## Making CouchDB development easy\n\nErica is a tool that helps you to create couchdb design docs,\nand web applications (couchapps), and generally get files in and out\nof CouchDB.\n\n## Requirements\n\n### Runtime\n* Erlang R14B04 or higher with crypto support\n\n### Compiling\n* gcc\n* [rebar](https://github.com/rebar/rebar)\n* git\n* erlang-src\n\n#### Installing Dependencies on Debian/Ubuntu\n\n    sudo apt-get install rebar erlang-src erlang-xmerl erlang-parsetools\n\n#### Installing Dependencies on Fedora\n    \n    sudo yum install erlang-rebar\n\n## Download\n\n* Signed [releases](https://people.apache.org/~dch/dist/tools/)\nare available from [dch](https://twitter.com/dch__)'s site.\n* Unix users will need to `chmod +x erica` and ensure it is on your PATH.\n* Windows users should use `erica.cmd` and simply drop it\ninto your `%COUCHDB%/bin` directory.\n\n## Installation\n\nTo install it from source you will have to clone the repository from\ngithub. Dependencies will be fetched during the build.\n\n    $ git clone git://github.com/benoitc/erica.git\n\nYou can also download the latested tarball available on the [download\npage](https://github.com/benoitc/erica/downloads):\n\n    $ curl -L -O https://github.com/downloads/benoitc/erica/erica-\u003cvsn\u003e.tar.gz\n\nThen build the sources:\n\n    $ cd erica\n    $ make\n\nThen you can use the generated script **erica** .\n\nTo install it on your system, run the command line:\n\n    $ make install\n\n### Upgrade from  the source repository\n\nWhen you want to upgrade from the source repository, run the following\ncommands:\n\n    $ git pull --rebase\n    $ make upgrade\n    $ make install\n\n## Quick Start: Design Docs\n\nSo need to make and mange design docs for couchdb?\n\n    # erica create-app\n    # cd myapp\n    # erica push myapp\n\nGo ahead and create views, shows, lists, etc.\n\n\n## Quick Start: Webapps\n\nTo create a webapp, follow this pattern.\n\n    # erica create-webapp\n    # cd myapp\n    # erica push myapp\n\nThis is an 'attachment first' style couchapp. Anything related to the design doc lives in _ddoc.\n\nAfter any changes, push it to your couchdb node\n\n    $ erica push http://127.0.0.1:5984/testdb\n\nThen visit the result on\n\n    http://127.0.0.1:5984/testdb/_design/myapp/_rewrite/\n\nThat's it.\n\nNote: By default the CouchDB Node uri is 127.0.0.1:5984 so you could\njust use the db name in push command line if you want:eri\n\n    $ erica push testdb\n\n\n## Detailed Usage:\n\n    # erica command\n\nWhere available commands are:\n\n    push           [options...] [dir]    dest  push anything to couchdb\n    create-webapp  [appid=myapp] ...     Create a webapp. Default:\n                                         appid=myapp, lang=javascript\n    create-ddoc    [appid=myapp] ...     Create a blank ddoc, Default:\n                                         appid=myapp, lang=javascript\n    create-app     appid=AppID lang=Lang Create a blank couchapp, Default:\n                                         appid=myapp, lang=javascript\n    create         template= [vars...]   create an application using a\n                                         template\n    init                                 initialize a .couchapprc\n    clone          [option] source dir   clone a document from couchdb\n    browse                               display the erica in the\n                                         browser.\n    web            port=Port [dir]       launch the web ui\n    help                                 Show the program options\n    version                              Show version information\n\n\nAnd more general options\n\n    $ erica -h\n    Usage: erica [-h] [-c] [-v] [-f] [-V] [--is-ddoc \u003cis_ddoc\u003e] [--docid \u003cdocid\u003e] [--atomic \u003catomic\u003e] [...] \u003ccommand,...\u003e\n\n      -h, --help\t\tShow the program options\n      -c, --commands\tShow available commands\n      -v, --verbose\t\tBe verbose about what gets done\n      -f, --force\t\tForce\n      -V, --version\t\tShow version information\n      --is-ddoc\t\tTell to push command if you send a design document or not.\n      --docid\t\tSet docid with push command\n      --atomic\t\tSend attachments inline with push command\n      command\t\tCommand to run (e.g. push)\n\n\n\n\n### 1 . About the Design Doc\n\nYou can use a template to create your design doc.\nIt will create a simple project that you can use for a\nstart:\n\n    $ erica create-ddoc appid=myapp lang=javascript\n    ==\u003e tmp (create-app)\n    Writing myapp/_id\n    Writing myapp/language\n    Writing myapp/.couchapprc\n\n    $ ls -fla myapp/\n    total 24\n    drwxr-xr-x   6 benoitc  wheel  204 Jun  7 11:13 .\n    drwxrwxrwt  13 root     wheel  442 Jun  7 11:13 ..\n    -rw-r--r--   1 benoitc  wheel   18 Jun  7 11:13 .couchapprc\n    drwxr-xr-x   2 benoitc  wheel   68 Jun  7 11:13 _attachments\n    -rw-r--r--   1 benoitc  wheel   13 Jun  7 11:13 _id\n    -rw-r--r--   1 benoitc  wheel   10 Jun  7 11:13 language\n\nErica has created an _attachments folder in the myapp folder. This is\nwhere you can put all the attachments. You can put your views functions in\n`views/viewname/{map,reduce}.js` , shows in `shows` folder, lists in\n`lists`, ... See the wiki for more info (soon).\n\n* *_id* is where you set the document id\n* *languages* is where you set the language of your application\n* *.couchapprc* is where you set some config infos for your app.\n\nNote: **erica** is language agnostic, so if you want to create your couchapp in\ncoffescript, just replace javascript by coffescript or use the language\nyou want if an couchapp server exists for it.\n\n\n### 2. Clone\n\nDid you see an interesting couchapp you want to reuse? Or just working\nwith a friend on the same couchapp ? With the `clone` command you can\nreplicate a couchapp on your filesystem, edit it and push the results\nafter:\n\n    $ erica clone http://127.0.0.1:5984/testdb/_design/myapp\n\nThis command will clone the couchapp `myapp` in the `myapp` folder. If\nyou want to clone it to another folder, just do:\n\n    $ erica clone http://127.0.0.1:5984/testdb/_design/myapp mynewapp\n\n## More\n\nAdd an `.ericaignore` file to the root of your app, as a JSON array\nof regular expressions of files or folders to be excluded from pushes.\n\n    [\"passwords.txt\", \"^\\.ssh\", \"^\\.*\"]\n\nWhen using templates, follow this format\n\n    # erica create template=name\n\nProvided templates are for now:\n\n* web (the template used with the create-web command)\n* ddoc (the default create used for create-ddoc command)\n* example: a simple couchapp example\n* couchapp: a simple template with the good old couchapp javascript library.\n\nYou can add your own template in ~/.erica/templates.\n\n\n## Getting Help\n\nIf you have any questions contact us on irc freenode **#couchapp** or on\nthe mailing-list: http://groups.google.com/group/couchapp .\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitc%2Ferica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenoitc%2Ferica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitc%2Ferica/lists"}