# Applying CLI commands from File

**URL:** <https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496>\
**Category:** Other Northbound Interfaces\
**Created:** [August 29, 2017, 8:40am UTC](https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496 "2017-08-29T08:40:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![khan](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@khan](https://dmap-community.ductus.global/u/khan)\
**Post date:** [August 29, 2017, 8:40am UTC](https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496/1 "2017-08-29T08:40:51Z")

</div>

hi,  
in our requirement we have to apply some configuration CLI commands written in some file, whenever the device comes up with out any user intervention.

i wanted to know is there any specific functionality/API so that we can use to implement this.

thanks

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [August 29, 2017, 4:30pm UTC](https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496/2 "2017-08-29T16:30:38Z")

</div>

You can run confd\_cli in a batch mode upon device startup to process your configuration CLI commands.

Following is a snippet of what is described in 16.4.1, Starting the CLI, of the ConfD User Guide:

> The confd\_cli program can also be used for batch processing of CLI commands, either by storing the commands in a file and running confd\_cli on the file, or by having the following line at the top of the file (with the location of the program modified appropriately):  
> `#!/bin/confd_cli`

In addition, the SCRIPTING section of the man pages for confd\_cli shows how to execute CLI commands in non-interactive mode from a shell script.

You can also use the confd\_load command line utility to load the configuration in CLI configuration format. Refer to vol. 1 of the man pages for confd\_load for more information.

---

<div class="post-metadata">

**Author:** ![jibrangill](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@jibrangill](https://dmap-community.ductus.global/u/jibrangill)\
**Post date:** [March 1, 2019, 5:45pm UTC](https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496/3 "2019-03-01T17:45:50Z")

</div>

Can you please share the documentation?

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [March 1, 2019, 8:05pm UTC](https://dmap-community.ductus.global/t/applying-cli-commands-from-file/1496/4 "2019-03-01T20:05:29Z")

</div>

The ConfD documentation comes with the ConfD Basic distribution available for download at [https://developer.cisco.com/site/confD/](https://developer.cisco.com/site/confD/).
